From c9862fe6dd4fc28793ad2fee363d0452c1506da7 Mon Sep 17 00:00:00 2001 From: Tamara Diaconita Date: Tue, 7 Mar 2017 18:38:59 +0200 Subject: staging: speakup: kobjects: Delete comparison Comparison to NULL is not necessary because 'if' statement tests if 'synth' is NULL anyway. Delete comparison in 'if' structure to fix the checkpath.pl issue : CHECK: Comparison to NULL could be written 'synth'. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/kobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/speakup') diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index a53628867966..9feb97dfd72b 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -392,7 +392,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, len--; new_synth_name[len] = '\0'; spk_strlwr(new_synth_name); - if ((synth != NULL) && (!strcmp(new_synth_name, synth->name))) { + if (synth && (!strcmp(new_synth_name, synth->name))) { pr_warn("%s already in use\n", new_synth_name); } else if (synth_init(new_synth_name) != 0) { pr_warn("failed to init synth %s\n", new_synth_name); -- cgit v1.2.3-55-g7522