]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ctcm: fix variable dereferenced before check
authorAlexandra Winter <wintera@linux.ibm.com>
Tue, 10 May 2022 07:05:06 +0000 (09:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 May 2022 11:31:01 +0000 (12:31 +0100)
commit5228164a115398989b3fe6a8f536b88f3269c877
tree4469aa230199e2cc5cc95adf9d7f6bbdeee3621e
parent5beaacfb14803f83aad7503bc0947e44b3d23d4f
s390/ctcm: fix variable dereferenced before check

Found by cppcheck and smatch.
smatch complains about
drivers/s390/net/ctcm_sysfs.c:43 ctcm_buffer_write() warn: variable dereferenced before check 'priv' (see line 42)

Fixes: caa8c2f49b23 ("ctcm: rename READ/WRITE defines to avoid redefinitions")
Reported-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/ctcm_sysfs.c