aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornibble.max <nibble.max@gmail.com>2014-10-23 10:36:49 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 11:53:00 -0200
commit4954578efb5fd91dd6432ecf7f04ba1b82a60693 (patch)
tree16124aeae90e57d0a53ccc4e37d8ac4dee350654
parent[media] cx23885: add DVBSky S950C and T980C RC support (diff)
downloadlinux-dev-4954578efb5fd91dd6432ecf7f04ba1b82a60693.tar.xz
linux-dev-4954578efb5fd91dd6432ecf7f04ba1b82a60693.zip
[media] m88ts2022: return the err code in its probe function when error occurs
if "chip_id" is wrong or "dev->cfg.clock_out" is invalid, the i2c model is still loaded. It will cause "kernel NULL pointer dereference" oops when the i2c model remove. returning the err code will prevent the i2c model load. Signed-off-by: Nibble Max <nibble.max@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--drivers/media/tuners/m88ts2022.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/tuners/m88ts2022.c b/drivers/media/tuners/m88ts2022.c
index caa542346891..066e5431da93 100644
--- a/drivers/media/tuners/m88ts2022.c
+++ b/drivers/media/tuners/m88ts2022.c
@@ -488,6 +488,7 @@ static int m88ts2022_probe(struct i2c_client *client,
case 0x83:
break;
default:
+ ret = -ENODEV;
goto err;
}
@@ -505,6 +506,7 @@ static int m88ts2022_probe(struct i2c_client *client,
u8tmp = 0x6c;
break;
default:
+ ret = -EINVAL;
goto err;
}