diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-27 05:51:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-03-01 10:01:45 -0500 |
commit | 55a1a9f1899e3001e32f73ccf6e29a71d9dd5fbc (patch) | |
tree | e430379914d503ccf213f8d9d0463baa43c3c1d5 | |
parent | 5d0f2df471f50c0ef1512d114ab5c711adfe2103 (diff) |
[media] pt3: fix device identification
As warned by smatch:
drivers/media/pci/pt3/pt3.c:398 pt3_attach_fe() error: strncmp() '"tc90522sat"' too small (11 vs 20)
Clearly, the logic is doing the wrong thing, as it is not comparing the strings
on the right way.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/pci/pt3/pt3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c index 0d2e2b217121..eff5e9f51ace 100644 --- a/drivers/media/pci/pt3/pt3.c +++ b/drivers/media/pci/pt3/pt3.c | |||
@@ -395,7 +395,8 @@ static int pt3_attach_fe(struct pt3_board *pt3, int i) | |||
395 | if (!try_module_get(cl->dev.driver->owner)) | 395 | if (!try_module_get(cl->dev.driver->owner)) |
396 | goto err_demod_i2c_unregister_device; | 396 | goto err_demod_i2c_unregister_device; |
397 | 397 | ||
398 | if (!strncmp(cl->name, TC90522_I2C_DEV_SAT, sizeof(cl->name))) { | 398 | if (!strncmp(cl->name, TC90522_I2C_DEV_SAT, |
399 | strlen(TC90522_I2C_DEV_SAT))) { | ||
399 | struct qm1d1c0042_config tcfg; | 400 | struct qm1d1c0042_config tcfg; |
400 | 401 | ||
401 | tcfg = adap_conf[i].tuner_cfg.qm1d1c0042; | 402 | tcfg = adap_conf[i].tuner_cfg.qm1d1c0042; |