Skip to contentSkip to conversation

Delete comparison to NULL

PATCH New Tamara Diaconita 1 participant 1 message Mar 3, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Delete comparison to NULL

Deleted the comparison to NULL to fix the checkpath.pl issue
CHECK: Comparison to NULL can be written 'virt_keyboard'.

There was no need to compare the variable to NULL because the if structure checks if the variable is NULL anyway.

---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +1 -1
index d76da0a..294c74b 100644
@@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void)
 
 void speakup_remove_virtual_keyboard(void)
 {
-	if (virt_keyboard != NULL) {
+	if (virt_keyboard) {
 		input_unregister_device(virt_keyboard);
 		virt_keyboard = NULL;
 	}
Signature · 1 line
2.9.3