summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorLv Ruyi <lv.ruyi@zte.com.cn>2022-04-18 10:58:34 +0000
committerDavid S. Miller <davem@davemloft.net>2022-04-22 10:20:43 +0100
commitd48fea8401cfa942c67cc3a522bf379143dbb576 (patch)
treef972e34640489a69e5f7e845447a2a87067ae576 /net/ipv4
parent59f0c2447e2553b0918b4a9fd38763a5c0587d02 (diff)
net: cosa: fix error check return value of register_chrdev()
If major equal 0, register_chrdev() returns error code when it fails. This function dynamically allocate a major and return its number on success, so we should use "< 0" to check it instead of "!". Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> Acked-By: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions