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

staging: speakup: Simplify "NULL" comparisons

Fixed coding style for null comparisons in speakup driver to be more
consistant with the rest of the kernel coding style.
Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arushi Singhal and committed by
Greg Kroah-Hartman
b8f107bc 049aa515

+4 -4
+1 -1
drivers/staging/speakup/selection.c
··· 175 175 176 176 int speakup_paste_selection(struct tty_struct *tty) 177 177 { 178 - if (cmpxchg(&speakup_paste_work.tty, NULL, tty) != NULL) 178 + if (cmpxchg(&speakup_paste_work.tty, NULL, tty)) 179 179 return -EBUSY; 180 180 181 181 tty_kref_get(tty);
+3 -3
drivers/staging/speakup/varhandlers.c
··· 98 98 } 99 99 } 100 100 p_header = var_ptrs[var->var_id]; 101 - if (p_header->data != NULL) 101 + if (p_header->data) 102 102 return; 103 103 p_header->data = var; 104 104 switch (p_header->var_type) { ··· 210 210 return -ERANGE; 211 211 212 212 var_data->u.n.value = val; 213 - if (var->var_type == VAR_TIME && p_val != NULL) { 213 + if (var->var_type == VAR_TIME && p_val) { 214 214 *p_val = msecs_to_jiffies(val); 215 215 return 0; 216 216 } 217 - if (p_val != NULL) 217 + if (p_val) 218 218 *p_val = val; 219 219 if (var->var_id == PUNC_LEVEL) { 220 220 spk_punc_mask = spk_punc_masks[val];