diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-03-01 08:55:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-11 14:55:37 -0400 |
commit | cdcb12e78a4559c1842fbf8fb82e770b9f7362d6 (patch) | |
tree | 741e3ab3560529b77da0f82eb81a72811c5de2d0 /drivers/media/pci | |
parent | f8817c9ea1f44aca9f342c6a314da4eb64ba0cb4 (diff) |
[media] ddbridge: remove unneeded an NULL check
Static checkers complain about the inconsistent NULL check here.
There is an unchecked dereference of "input->fe" in the call to
tuner_attach_tda18271() and there is a second unchecked dereference a
couple lines later when we do:
input->fe2->tuner_priv = input->fe->tuner_priv;
But actually "intput->fe" can't be NULL because if demod_attach_drxk()
fails to allocate it, then we would have return an error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index 9375f30d9a81..fb52bda8d45f 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c | |||
@@ -876,10 +876,8 @@ static int dvb_input_attach(struct ddb_input *input) | |||
876 | return -ENODEV; | 876 | return -ENODEV; |
877 | if (tuner_attach_tda18271(input) < 0) | 877 | if (tuner_attach_tda18271(input) < 0) |
878 | return -ENODEV; | 878 | return -ENODEV; |
879 | if (input->fe) { | 879 | if (dvb_register_frontend(adap, input->fe) < 0) |
880 | if (dvb_register_frontend(adap, input->fe) < 0) | 880 | return -ENODEV; |
881 | return -ENODEV; | ||
882 | } | ||
883 | if (input->fe2) { | 881 | if (input->fe2) { |
884 | if (dvb_register_frontend(adap, input->fe2) < 0) | 882 | if (dvb_register_frontend(adap, input->fe2) < 0) |
885 | return -ENODEV; | 883 | return -ENODEV; |