Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303759 > unrolled thread

[PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison

Started byShraddha Barke <shraddha.6596@gmail.com>
First post2016-01-07 18:40 +0100
Last post2016-01-07 18:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison Shraddha Barke <shraddha.6596@gmail.com> - 2016-01-07 18:40 +0100

#1303759 — [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison

FromShraddha Barke <shraddha.6596@gmail.com>
Date2016-01-07 18:40 +0100
Subject[PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison
Message-ID<qOmHv-2SG-17@gated-at.bofh.it>
Remove explicit NULL comparison and write it in its simpler form.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 No change.Added lkml and other maintainers.

 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.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web