summaryrefslogtreecommitdiff
path: root/drivers/nvmem/jz4780-efuse.c
diff options
context:
space:
mode:
authorSamuel Zou <zou_wei@huawei.com>2020-05-11 17:50:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-15 17:20:02 +0300
commite270df39f728fd47771613f1147b26a600d183e8 (patch)
treed632d26e01f8d80407be59230f1a61937663b837 /drivers/nvmem/jz4780-efuse.c
parentb96fc5416b099a0c2509ca07a80b140d34db2b9b (diff)
downloadlinux-e270df39f728fd47771613f1147b26a600d183e8.tar.xz
nvmem: jz4780-efuse: Use PTR_ERR_OR_ZERO() to simplify code
Fixes coccicheck warning: drivers/nvmem/jz4780-efuse.c:214:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Samuel Zou <zou_wei@huawei.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200511145042.31223-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/jz4780-efuse.c')
-rw-r--r--drivers/nvmem/jz4780-efuse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvmem/jz4780-efuse.c b/drivers/nvmem/jz4780-efuse.c
index 512e1872ba36..0b01b840edd9 100644
--- a/drivers/nvmem/jz4780-efuse.c
+++ b/drivers/nvmem/jz4780-efuse.c
@@ -211,10 +211,8 @@ static int jz4780_efuse_probe(struct platform_device *pdev)
cfg.priv = efuse;
nvmem = devm_nvmem_register(dev, &cfg);
- if (IS_ERR(nvmem))
- return PTR_ERR(nvmem);
- return 0;
+ return PTR_ERR_OR_ZERO(nvmem);
}
static const struct of_device_id jz4780_efuse_match[] = {