If numberOfParameters is not 2 or 4, we log a warning and then
continue.  Depending on compiler version and options, this may be
recognised as an impossible case or may otherwise provoke the warning
that 'status' is uninitialised.  Using the more forceful BUG() avoids
this warning, and makes it harder to ignore incorrect usage.

Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 drivers/media/dvb-frontends/drxk_hard.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/drxk_hard.c 
b/drivers/media/dvb-frontends/drxk_hard.c
index 8b4c6d5..6da00ac 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -5459,8 +5459,7 @@ static int QAMDemodulatorCommand(struct drxk_state *state,
                                     numberOfParameters, setParamParameters,
                                     1, &cmdResult);
        } else {
-               printk(KERN_WARNING "drxk: Unknown QAM demodulator parameter "
-                       "count %d\n", numberOfParameters);
+               BUG();
        }
 
 error:


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to