提交 269ad6e0 编写于 作者: C Christian Colic 提交者: Greg Kroah-Hartman

staging: goldfish: (coding style) Rewrite comparisons to NULL as "!data->reg_base"

Rewrite comparisons to NULL "data->reg_base == NULL" as "!data->reg_base" to conform to checkpatch.
Signed-off-by: NChristian Colic <colic.christian@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2ce601b0
...@@ -280,12 +280,12 @@ static int goldfish_audio_probe(struct platform_device *pdev) ...@@ -280,12 +280,12 @@ static int goldfish_audio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, data); platform_set_drvdata(pdev, data);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0); r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (r == NULL) { if (!r) {
dev_err(&pdev->dev, "platform_get_resource failed\n"); dev_err(&pdev->dev, "platform_get_resource failed\n");
return -ENODEV; return -ENODEV;
} }
data->reg_base = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE); data->reg_base = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
if (data->reg_base == NULL) if (!data->reg_base)
return -ENOMEM; return -ENOMEM;
data->irq = platform_get_irq(pdev, 0); data->irq = platform_get_irq(pdev, 0);
...@@ -295,7 +295,7 @@ static int goldfish_audio_probe(struct platform_device *pdev) ...@@ -295,7 +295,7 @@ static int goldfish_audio_probe(struct platform_device *pdev)
} }
data->buffer_virt = dmam_alloc_coherent(&pdev->dev, data->buffer_virt = dmam_alloc_coherent(&pdev->dev,
COMBINED_BUFFER_SIZE, &buf_addr, GFP_KERNEL); COMBINED_BUFFER_SIZE, &buf_addr, GFP_KERNEL);
if (data->buffer_virt == NULL) { if (!data->buffer_virt) {
dev_err(&pdev->dev, "allocate buffer failed\n"); dev_err(&pdev->dev, "allocate buffer failed\n");
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册