Commit 55a1a9f1 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 5d0f2df4
...@@ -395,7 +395,8 @@ static int pt3_attach_fe(struct pt3_board *pt3, int i) ...@@ -395,7 +395,8 @@ static int pt3_attach_fe(struct pt3_board *pt3, int i)
if (!try_module_get(cl->dev.driver->owner)) if (!try_module_get(cl->dev.driver->owner))
goto err_demod_i2c_unregister_device; goto err_demod_i2c_unregister_device;
if (!strncmp(cl->name, TC90522_I2C_DEV_SAT, sizeof(cl->name))) { if (!strncmp(cl->name, TC90522_I2C_DEV_SAT,
strlen(TC90522_I2C_DEV_SAT))) {
struct qm1d1c0042_config tcfg; struct qm1d1c0042_config tcfg;
tcfg = adap_conf[i].tuner_cfg.qm1d1c0042; tcfg = adap_conf[i].tuner_cfg.qm1d1c0042;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment