Skip to contentSkip to conversation

gpio-pch: cleanup NULL pointer checking

PATCH Superseded Németh Márton 2 participants 2 messages Jan 15, 2012 – Jan 17, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 gpio-pch: cleanup NULL pointer checking

From: Márton Németh <[email protected]>

This patch will remove the following sparse warning ("make C=1"):
* warning: Using plain integer as NULL pointer

---
 drivers/gpio/gpio-pch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/gpio-pch.c +1 -1
index 9061b55..68fa55e 100644
@@ -376,7 +376,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
 	}
 
 	chip->base = pci_iomap(pdev, 1, 0);
-	if (chip->base == 0) {
+	if (!chip->base) {
 		dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__);
 		ret = -ENOMEM;
 		goto err_iomap;
Signature · 1 line
1.7.2.5