projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06c24f6
)
[media] variable name is never null, so remove null check
author
Colin Ian King
<
[email protected]
>
Tue, 6 Sep 2016 12:44:09 +0000
(09:44 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Mon, 24 Oct 2016 19:04:27 +0000
(17:04 -0200)
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 <
[email protected]
>
drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
b/drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
index 06fe63ced58cdac55b793b65c66d203fc0918210..d977976b8d919ab7a15911e89fdd1be2cffbbc25 100644
(file)
--- 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);
}