]> git.baikalelectronics.ru Git - kernel.git/commit
HID: picoLCD: fix a NULL test in picolcd_raw_cir()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Sep 2012 06:47:41 +0000 (09:47 +0300)
committerJiri Kosina <jkosina@suse.cz>
Sat, 8 Sep 2012 19:19:07 +0000 (21:19 +0200)
commitf6a7914e9a0be524a203b40ca26763c293b82672
treeeb1e1468ec5d8820afc4b250601581be27691083
parentf5909f5ccfa8c9183b7ac8e9259e9fd842bf7bfe
HID: picoLCD: fix a NULL test in picolcd_raw_cir()

Smatch complains that the NULL checking in this function is not
consistent and could lead to a NULL dereference.  The comments say that
we should return here if rc_dev is NULL so I've changed the test to
match the comment.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd_cir.c