Commit 69be9264 authored by Markus Elfring's avatar Markus Elfring Committed by Martin K. Petersen

scsi: ufs-hisi: Use PTR_ERR_OR_ZERO() in ufs_hisi_get_resource()

Simplify this function implementation by using a known function.

Generated by: scripts/coccinelle/api/ptr_ret.cocci

[mkp: applied by hand]

Link: https://lore.kernel.org/r/9e667f19-434e-ed30-78cb-9ddc6323c51e@web.deSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7e52440c
...@@ -452,10 +452,7 @@ static int ufs_hisi_get_resource(struct ufs_hisi_host *host) ...@@ -452,10 +452,7 @@ static int ufs_hisi_get_resource(struct ufs_hisi_host *host)
/* get resource of ufs sys ctrl */ /* get resource of ufs sys ctrl */
host->ufs_sys_ctrl = devm_platform_ioremap_resource(pdev, 1); host->ufs_sys_ctrl = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(host->ufs_sys_ctrl)) return PTR_ERR_OR_ZERO(host->ufs_sys_ctrl);
return PTR_ERR(host->ufs_sys_ctrl);
return 0;
} }
static void ufs_hisi_set_pm_lvl(struct ufs_hba *hba) static void ufs_hisi_set_pm_lvl(struct ufs_hba *hba)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment