From: Michael Krufky Date: Thu, 12 Mar 2009 13:12:16 +0000 (-0300) Subject: V4L/DVB (10984): lgdt3305: avoid OOPS in error path of lgdt3305_attach X-Git-Tag: firefly_0821_release~15196^2~239 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f9cd8f18c7faabf6dc144c198f6ee30429d3da0;p=firefly-linux-kernel-4.4.55.git V4L/DVB (10984): lgdt3305: avoid OOPS in error path of lgdt3305_attach Setting state->frontend.demodulator_priv to NULL in the event of a kzalloc error will result in an OOPS. Just remove that line. Thanks to Matthias Schwarzott for pointing this out. Cc: Matthias Schwarzott Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/lgdt3305.c b/drivers/media/dvb/frontends/lgdt3305.c index 0ad820b08ca5..d92d0557a80b 100644 --- a/drivers/media/dvb/frontends/lgdt3305.c +++ b/drivers/media/dvb/frontends/lgdt3305.c @@ -1047,7 +1047,6 @@ struct dvb_frontend *lgdt3305_attach(const struct lgdt3305_config *config, return &state->frontend; fail: lg_warn("unable to detect LGDT3305 hardware\n"); - state->frontend.demodulator_priv = NULL; kfree(state); return NULL; }