Jelajahi Sumber

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>
Todd Poynor 7 tahun lalu
induk
melakukan
14d7022977
1 mengubah file dengan 0 tambahan dan 5 penghapusan
  1. 0 5
      drivers/staging/gasket/gasket_sysfs.c

+ 0 - 5
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) {