[PATCH -next] staging/goldfish/goldfish_audio: fix a sparse warning

From: Robin Schroer
Date: Wed Jul 23 2014 - 02:16:48 EST


Fix a pointer check to use NULL instead of 0

Warning:
drivers/staging/goldfish/goldfish_audio.c:300:34: warning: Using plain
integer as NULL pointer

Signed-off-by: Robin Schroer <sulamiification@xxxxxxxxx>
---
drivers/staging/goldfish/goldfish_audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index 9df4ad8..c89d0b8 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -297,7 +297,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 == 0) {
+ if (data->buffer_virt == NULL) {
dev_err(&pdev->dev, "allocate buffer failed\n");
return -ENOMEM;
}
--
2.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/