[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191217161318.31402-16-Jerome.Pouiller@silabs.com>
Date: Tue, 17 Dec 2019 16:14:48 +0000
From: Jérôme Pouiller <Jerome.Pouiller@...abs.com>
To: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kalle Valo <kvalo@...eaurora.org>,
"David S . Miller" <davem@...emloft.net>,
Jérôme Pouiller <Jerome.Pouiller@...abs.com>
Subject: [PATCH v2 15/55] staging: wfx: take advantage of IS_ERR_OR_NULL()
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
Obviously, current code can be replaced by IS_ERR_OR_NULL().
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
drivers/staging/wfx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index 3b47b6c21ea1..cf4bcb14a12d 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -182,7 +182,7 @@ struct gpio_desc *wfx_get_gpio(struct device *dev, int override,
} else {
ret = devm_gpiod_get(dev, label, GPIOD_OUT_LOW);
}
- if (IS_ERR(ret) || !ret) {
+ if (IS_ERR_OR_NULL(ret)) {
if (!ret || PTR_ERR(ret) == -ENOENT)
dev_warn(dev, "gpio %s is not defined\n", label);
else
--
2.24.0
Powered by blists - more mailing lists