diff options
author | Lv Ruyi <[email protected]> | 2022-04-18 10:58:34 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-04-22 10:20:43 +0100 |
commit | d48fea8401cfa942c67cc3a522bf379143dbb576 (patch) | |
tree | f972e34640489a69e5f7e845447a2a87067ae576 /lib/netdev-notifier-error-inject.c | |
parent | 59f0c2447e2553b0918b4a9fd38763a5c0587d02 (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 <[email protected]>
Signed-off-by: Lv Ruyi <[email protected]>
Acked-By: Jan "Yenya" Kasprzak <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions