summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Palminha <CARLOS.PALMINHA@synopsys.com>2016-09-29 14:03:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-02 17:18:38 +0200
commit52b4f6e081ba20adac694f5e445be2dcb469d3a1 (patch)
treedcfd451f2690a062f32df16a257c76a637e4ec45
parentStaging: rts5208: Fix indentation warnings (diff)
downloadlinux-52b4f6e081ba20adac694f5e445be2dcb469d3a1.tar.xz
linux-52b4f6e081ba20adac694f5e445be2dcb469d3a1.zip
staging: fbtft: fix NULL comparison checkpatch warning
Fixed the following checkpatch warnings (task #10 of eudyptula challenge): - NULL comparison rewritten to use '!' operator Signed-off-by: Carlos Palminha <palminha@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/fbtft/fbtft_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index e9f25ddebff0..e9211831b6a1 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -1418,14 +1418,14 @@ static int __init fbtft_device_init(void)
/* parse module parameter: gpios */
while ((p_gpio = strsep(&gpios, ","))) {
- if (strchr(p_gpio, ':') == NULL) {
+ if (!strchr(p_gpio, ':')) {
pr_err("error: missing ':' in gpios parameter: %s\n",
p_gpio);
return -EINVAL;
}
p_num = p_gpio;
p_name = strsep(&p_num, ":");
- if (p_name == NULL || p_num == NULL) {
+ if (!p_name || !p_num) {
pr_err("something bad happened parsing gpios parameter: %s\n",
p_gpio);
return -EINVAL;