From: Sachin Kamat Date: Mon, 13 May 2013 10:00:42 +0000 (+0530) Subject: Staging: speakup: Fix sparse warning in varhandlers.c X-Git-Tag: firefly_0821_release~176^2~5845^2~676 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=15ab600ce34a51e1cbcd3446dd21b67473e1f79e;p=firefly-linux-kernel-4.4.55.git Staging: speakup: Fix sparse warning in varhandlers.c 'cp' is a pointer. Fix the incorrect comparison with integer to avoid the below warning: drivers/staging/speakup/varhandlers.c:283:19: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 2e8603d7b14a..9aa2a78cd71c 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -277,7 +277,7 @@ int spk_set_mask_bits(const char *input, const int which, const int how) spk_chartab[*cp] &= ~mask; } cp = (u_char *)input; - if (cp == 0) + if (!cp) cp = spk_punc_info[which].value; else { for ( ; *cp; cp++) {