* [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
@ 2015-12-11 21:39 Benjamin Young
2016-02-08 2:29 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Young @ 2015-12-11 21:39 UTC (permalink / raw)
To: gregkh, sudipm.mukherjee; +Cc: devel, linux-kernel, Benjamin Young
Fixed coding style for null comparisons in goldfish_audio.c to be more consistant
with the rest of the kernel coding style
Signed-off-by: Benjamin Young <youngcdev@gmail.com>
---
drivers/staging/goldfish/goldfish_audio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index f1e1838..364fdcd 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -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;
}
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
2015-12-11 21:39 [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r" Benjamin Young
@ 2016-02-08 2:29 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-02-08 2:29 UTC (permalink / raw)
To: Benjamin Young; +Cc: sudipm.mukherjee, devel, linux-kernel
On Fri, Dec 11, 2015 at 04:39:26PM -0500, Benjamin Young wrote:
> Fixed coding style for null comparisons in goldfish_audio.c to be more consistant
> with the rest of the kernel coding style
>
> Signed-off-by: Benjamin Young <youngcdev@gmail.com>
> ---
> drivers/staging/goldfish/goldfish_audio.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
> index f1e1838..364fdcd 100644
> --- a/drivers/staging/goldfish/goldfish_audio.c
> +++ b/drivers/staging/goldfish/goldfish_audio.c
> @@ -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;
> }
Same here, someone beat you to it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-08 2:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 21:39 [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r" Benjamin Young
2016-02-08 2:29 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox