]> git.baikalelectronics.ru Git - kernel.git/commit
[media] bt8xx: remove needless check
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Jun 2015 11:35:09 +0000 (08:35 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Jun 2015 14:26:35 +0000 (11:26 -0300)
commit8404f7d2c0f0bc716828a51f5893d4b076595dc9
treed7ebd45f1ee03e98b8e65409c167aa37cd7f0051
parentff6ee4c47378331be4dbc92eb95b55f6ae88dc6d
[media] bt8xx: remove needless check

As reported by smatch:
drivers/media/pci/bt8xx/dst_ca.c:323 ca_get_message() warn: this array is probably non-NULL. 'p_ca_message->msg'
drivers/media/pci/bt8xx/dst_ca.c:498 ca_send_message() warn: this array is probably non-NULL. 'p_ca_message->msg'

Those two checks are needless/useless, as the ca_msg struct is
declared as:
typedef struct ca_msg {
        unsigned int index;
        unsigned int type;
        unsigned int length;
        unsigned char msg[256];
} ca_msg_t;

So, if the p_ca_message pointer is not null, msg will also be
not null.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/bt8xx/dst_ca.c