]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit2c50c6867c85afee6f2b3bcbc50fc9d0083d1343
tree4469aa230199e2cc5cc95adf9d7f6bbdeee3621e
parent2423b0d0724d47897c8a3a988f62aedd3e87ceba
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: 3c09e2647b5e ("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