mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
mmc: rockchip_sdhci: Correct error checking
A pointer can not be negative. Use macro IS_ERR_OR_NULL() for checking. Signed-off-by: Haolin Li <li.haolin@qq.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
9859465bfe
commit
fdda7901cc
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ static int rk3399_emmc_get_phy(struct udevice *dev)
|
|||
}
|
||||
|
||||
grf_base = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
|
||||
if (grf_base < 0) {
|
||||
if (IS_ERR_OR_NULL(grf_base)) {
|
||||
printf("%s Get syscon grf failed", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue