* [PATCH] [media] variable name is never null, so remove null check
@ 2016-09-06 12:44 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2016-09-06 12:44 UTC (permalink / raw)
To: Mike Isely, Mauro Carvalho Chehab, linux-media; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable name is always assigned to a literal string in the
proceeding switch statement, so it is never null and hence the
null check is redundant. Remove null the check.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/usb/pvrusb2/pvrusb2-sysfs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
index 06fe63c..d977976 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
@@ -116,7 +116,6 @@ static ssize_t show_type(struct device *class_dev,
}
pvr2_sysfs_trace("pvr2_sysfs(%p) show_type(cid=%d) is %s",
cip->chptr, cip->ctl_id, name);
- if (!name) return -EINVAL;
return scnprintf(buf, PAGE_SIZE, "%s\n", name);
}
--
2.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-06 12:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 12:44 [PATCH] [media] variable name is never null, so remove null check Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).