mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b96fc5416b
commit
e270df39f7
@@ -211,10 +211,8 @@ static int jz4780_efuse_probe(struct platform_device *pdev)
|
|||||||
cfg.priv = efuse;
|
cfg.priv = efuse;
|
||||||
|
|
||||||
nvmem = devm_nvmem_register(dev, &cfg);
|
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[] = {
|
static const struct of_device_id jz4780_efuse_match[] = {
|
||||||
|
Reference in New Issue
Block a user