summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/pt1
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-05 07:32:27 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-05 07:32:27 -0400
commit5ebaf32866b649cc4e384725ce2742d705c064e6 (patch)
tree0994b2bd61802bc2a7847950aaa65140d8c15bcf /drivers/media/pci/pt1
parent20a63349b1423179612c7ad550e430a1eef49a19 (diff)
downloadblackbird-op-linux-5ebaf32866b649cc4e384725ce2742d705c064e6.tar.gz
blackbird-op-linux-5ebaf32866b649cc4e384725ce2742d705c064e6.zip
media: pt1: fix strncmp() size warning
As warned by smatch: drivers/media/pci/pt1/pt1.c:213 config_demod() error: strncmp() '"tc90522sat"' too small (11 vs 20) Use the same strncmp() syntax as pt1_init_frontends() does. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/pt1')
-rw-r--r--drivers/media/pci/pt1/pt1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index a3126d7caac7..3b7e08a4639a 100644
--- a/drivers/media/pci/pt1/pt1.c
+++ b/drivers/media/pci/pt1/pt1.c
@@ -210,7 +210,8 @@ static int config_demod(struct i2c_client *cl, enum pt1_fe_clk clk)
return ret;
usleep_range(30000, 50000);
- is_sat = !strncmp(cl->name, TC90522_I2C_DEV_SAT, I2C_NAME_SIZE);
+ is_sat = !strncmp(cl->name, TC90522_I2C_DEV_SAT,
+ strlen(TC90522_I2C_DEV_SAT));
if (is_sat) {
struct i2c_msg msg[2];
u8 wbuf, rbuf;
OpenPOWER on IntegriCloud