diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-27 22:21:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-28 09:24:10 +0200 |
commit | 14d70229777f17fe3c22deb559821038663bae78 (patch) | |
tree | c567d0d0414a59a77c395ad6bf49c77979414a34 /drivers | |
parent | f390d08d8b872a0f71db45bc970a238475679fac (diff) |
staging: gasket: sysfs: remove unnecessary NULL check on device ptr
The device pointer passed into get_mapping() will never be NULL; the
check is unnecessary.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/gasket/gasket_sysfs.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c index 2d8647de697c..da972ce0e0db 100644 --- 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) { |