staging: goldfish: (coding style) Rewrite comparisons to NULL as "!data->reg_base"
authorChristian Colic <colic.christian@gmail.com>
Thu, 19 Nov 2015 08:47:24 +0000 (09:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 02:29:00 +0000 (18:29 -0800)
Rewrite comparisons to NULL "data->reg_base == NULL" as "!data->reg_base" to conform to checkpatch.

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/goldfish/goldfish_audio.c

index f1e18386e34d62e661629e3d932885583ea765b4..364fdcdd3a06ea101a4f5067e500c4e45ee0397e 100644 (file)
@@ -280,12 +280,12 @@ static int goldfish_audio_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, data);
 
        r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (r == NULL) {
+       if (!r) {
                dev_err(&pdev->dev, "platform_get_resource failed\n");
                return -ENODEV;
        }
        data->reg_base = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
-       if (data->reg_base == NULL)
+       if (!data->reg_base)
                return -ENOMEM;
 
        data->irq = platform_get_irq(pdev, 0);
@@ -295,7 +295,7 @@ static int goldfish_audio_probe(struct platform_device *pdev)
        }
        data->buffer_virt = dmam_alloc_coherent(&pdev->dev,
                                COMBINED_BUFFER_SIZE, &buf_addr, GFP_KERNEL);
-       if (data->buffer_virt == NULL) {
+       if (!data->buffer_virt) {
                dev_err(&pdev->dev, "allocate buffer failed\n");
                return -ENOMEM;
        }