浏览代码

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 <zzam@gentoo.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky 16 年之前
父节点
当前提交
9f9cd8f18c
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      drivers/media/dvb/frontends/lgdt3305.c

+ 0 - 1
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;
 }