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:
f390d08
)
staging: gasket: sysfs: remove unnecessary NULL check on device ptr
author
Todd Poynor
<
[email protected]
>
Sat, 28 Jul 2018 05:21:58 +0000
(22:21 -0700)
committer
Greg Kroah-Hartman
<
[email protected]
>
Sat, 28 Jul 2018 07:24:10 +0000
(09:24 +0200)
The device pointer passed into get_mapping() will never be NULL; the
check is unnecessary.
Reported-by: Greg Kroah-Hartman <
[email protected]
>
Signed-off-by: Todd Poynor <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/gasket/gasket_sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/staging/gasket/gasket_sysfs.c
b/drivers/staging/gasket/gasket_sysfs.c
index 2d8647de697cd9de9d40af54aa81b1739a4a2423..da972ce0e0db0eb84d4d0448e03418b2565de83d 100644
(file)
--- a/
drivers/staging/gasket/gasket_sysfs.c
+++ b/
drivers/staging/gasket/gasket_sysfs.c
@@
-67,11
+67,6
@@
static struct gasket_sysfs_mapping *get_mapping(struct device *device)
{
int i;
- if (!device) {
- pr_debug("%s: Received NULL device\n", __func__);
- return NULL;
- }
-
for (i = 0; i < GASKET_SYSFS_NUM_MAPPINGS; i++) {
mutex_lock(&dev_mappings[i].mutex);
if (dev_mappings[i].device == device) {