staging: goldfish: Change form of NULL comparisons
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Tue, 9 Feb 2016 22:51:03 +0000 (17:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Feb 2016 01:48:01 +0000 (17:48 -0800)
Change null comparisons of the form x == NULL to !x. This was suggested
by checkpatch.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/goldfish/goldfish_audio.c

index b0927e49d0a81f31e63895fa2621ed61bfc30a57..891dfaaf159305112dcd135b111c7f655b140a1d 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;
        }