diff mbox series

[10/16] memory: omap-gpmc: Consistently use !res for NULL checks

Message ID 20200724182328.3348-11-krzk@kernel.org (mailing list archive)
State New, archived
Headers show
Series memory: Further cleanups | expand

Commit Message

Krzysztof Kozlowski July 24, 2020, 6:23 p.m. UTC
The driver already uses 'if (!res)' pattern in the probe function so be
consistent.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/omap-gpmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Aug. 17, 2020, 6:37 p.m. UTC | #1
On Fri, Jul 24, 2020 at 08:23:22PM +0200, Krzysztof Kozlowski wrote:
> The driver already uses 'if (!res)' pattern in the probe function so be
> consistent.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/memory/omap-gpmc.c | 2 +-

Applied.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 76a9c700cbd5..ce0e7e2d7cff 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2393,7 +2393,7 @@  static int gpmc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, gpmc);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL)
+	if (!res)
 		return -ENOENT;
 
 	gpmc_base = devm_ioremap_resource(&pdev->dev, res);