mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 09:43:54 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
259334ed30
commit
52b4f6e081
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user