From: Daniel Scheller Date: Tue, 14 Mar 2017 22:22:37 +0000 (-0300) Subject: [media] dvb-frontends/drxk: don't log errors on unsupported operation mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b73bb2ab97eb7840d0f4fc285936024100f59a6d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] dvb-frontends/drxk: don't log errors on unsupported operation mode When fe_ops.read_status is called and no channel is tuned (yet), the subsequent calls to get_lock_status() causes the kernel log to be filled with drxk: Error -22 on get_lock_status which either means a NULL pointer was passed for the p_lock_status var, or neither QAM nor OFDM/DVBT operation mode are active. Instead of filling the kernel log in the latter case, print out a message to the debug level and return 0 (this isn't used in the calling drxk_get_stats() anyway). Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 7e1bbbaad625..b5ea9192a341 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -1904,7 +1904,9 @@ static int get_lock_status(struct drxk_state *state, u32 *p_lock_status) status = get_dvbt_lock_status(state, p_lock_status); break; default: - break; + pr_debug("Unsupported operation mode %d in %s\n", + state->m_operation_mode, __func__); + return 0; } error: if (status < 0)