Commit f654b100 authored by Alexandra Winter's avatar Alexandra Winter Committed by Zheng Zengkai
Browse files

s390/ctcm: fix variable dereferenced before check

stable inclusion
from stable-v5.10.117
commit 5497f87edcdacba158c3b8a94137e39b6ade296c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L66B

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5497f87edcdacba158c3b8a94137e39b6ade296c



--------------------------------

[ Upstream commit 2c50c686 ]

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: 3c09e264 ("ctcm: rename READ/WRITE defines to avoid redefinitions")
Reported-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent e8b94d05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment