Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14d70229 authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f390d08d
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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) {