OSDN Git Service

staging: octeon-usb: use preferred style for NULL comparison
authorAaro Koskinen <aaro.koskinen@iki.fi>
Fri, 26 Feb 2016 00:13:51 +0000 (02:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Feb 2016 06:38:16 +0000 (22:38 -0800)
Use preferred coding style for NULL comparison.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/octeon-hcd.c

index 1ec8906..27a7542 100644 (file)
@@ -3553,7 +3553,7 @@ static int octeon_usb_probe(struct platform_device *pdev)
        const char *clock_type;
        int i;
 
-       if (dev->of_node == NULL) {
+       if (!dev->of_node) {
                dev_err(dev, "Error: empty of_node\n");
                return -ENXIO;
        }
@@ -3599,7 +3599,7 @@ static int octeon_usb_probe(struct platform_device *pdev)
                initialize_flags |= CVMX_USB_INITIALIZE_FLAGS_CLOCK_XO_GND;
 
        res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (res_mem == NULL) {
+       if (!res_mem) {
                dev_err(dev, "found no memory resource\n");
                return -ENXIO;
        }