V4L/DVB (10984): lgdt3305: avoid OOPS in error path of lgdt3305_attach
authorMichael Krufky <mkrufky@linuxtv.org>
Thu, 12 Mar 2009 13:12:16 +0000 (10:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:20 +0000 (12:43 -0300)
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 <zzam@gentoo.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/lgdt3305.c

index 0ad820b08ca5265c4d470bd61d64988a599850dc..d92d0557a80b719cdcf3e99bc876df6d56bad2eb 100644 (file)
@@ -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;
 }