PD#TV-1539
Problem:
Prevent NULL pointer crash caused by tuner attach failure.
Solution:
Prevent NULL pointer crash caused by tuner attach failure.
Verify:
verified by x301
Change-Id: I57cf32947775626467eb952dd2298ae9ec84601d
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
dvbfe = aml_get_fe();/*get_si2177_tuner();*/
#if 0
if (dvbfe != NULL)
+ if (dvbfe->ops.tuner_ops.get_strength)
strength = dvbfe->ops.tuner_ops.get_strength(dvbfe);
#else
strength = tuner_get_ch_power2();
#if 0 /*ary temp for my_tool:*/
if (dvbfe != NULL) {
pr_dbg("calling tuner ops\n");
- dvbfe->ops.tuner_ops.set_params(dvbfe);
+ if (dvbfe->ops.tuner_ops.set_params)
+ dvbfe->ops.tuner_ops.set_params(dvbfe);
}
#endif
break;
else if (mode == AM_FE_ISDBT_N)
fe->ops.info.type = FE_ISDBT;
- fe->ops.tuner_ops.set_config(fe, NULL);
+ if (fe->ops.tuner_ops.set_config)
+ fe->ops.tuner_ops.set_config(fe, NULL);
return 0;
}