Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings

This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the pointer test against 0 with a logical test.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Remonda and committed by
Greg Kroah-Hartman
04ca5837 c942ea7a

+1 -1
+1 -1
drivers/staging/most/mostcore/core.c
··· 982 982 if (ret) 983 983 return ret; 984 984 985 - if (mdev_devnod == 0 || *mdev_devnod == 0) { 985 + if (!mdev_devnod || *mdev_devnod == 0) { 986 986 snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, mdev_ch); 987 987 mdev_devnod = devnod_buf; 988 988 }