forked from MIrrors/gasket-driver
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>
This commit is contained in:
committed by
Alex Van Damme
parent
f10af4ee11
commit
a7ac1d2090
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user