]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
hwmon: (ibmpowernv) drop unnecessary OF name NULL checks
authorRob Herring <robh@kernel.org>
Wed, 29 Aug 2018 20:02:21 +0000 (15:02 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 11 Oct 2018 03:37:13 +0000 (20:37 -0700)
Checking the child node names is pointless as the DT node name can
never be NULL, so remove it.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-hwmon@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ibmpowernv.c

index 4935897f152738b5cbfff87e4f759ccfb426beae..0ccca87f527191dc000649d1a0b1eaf44c87d35b 100644 (file)
@@ -458,9 +458,6 @@ static int populate_attr_groups(struct platform_device *pdev)
        for_each_child_of_node(opal, np) {
                const char *label;
 
-               if (np->name == NULL)
-                       continue;
-
                type = get_sensor_type(np);
                if (type == MAX_SENSOR_TYPE)
                        continue;
@@ -589,9 +586,6 @@ static int create_device_attrs(struct platform_device *pdev)
                const char *label;
                enum sensors type;
 
-               if (np->name == NULL)
-                       continue;
-
                type = get_sensor_type(np);
                if (type == MAX_SENSOR_TYPE)
                        continue;