[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180304175612.GA50987@lkp-hsx02>
Date: Mon, 5 Mar 2018 01:56:12 +0800
From: kbuild test robot <lkp@...el.com>
To: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: kbuild-all@...org,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Andrey Smirnov <andrew.smirnov@...il.com>,
Heiko Stuebner <heiko@...ech.de>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Carlo Caione <carlo@...one.org>,
Kevin Hilman <khilman@...libre.com>,
Matthias Brugger <matthias.bgg@...il.com>, cphealy@...il.com,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
From: Fengguang Wu <fengguang.wu@...el.com>
drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
CC: Andrey Smirnov <andrew.smirnov@...il.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
meson-efuse.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
econfig.size = size;
nvmem = devm_nvmem_register(&pdev->dev, &econfig);
- if (IS_ERR(nvmem))
- return PTR_ERR(nvmem);
-
- return 0;
+ return PTR_ERR_OR_ZERO(nvmem);
}
static struct platform_driver meson_efuse_driver = {
Powered by blists - more mailing lists