* [PATCH] mmc: rockchip_sdhci: Correct error checking
@ 2022-03-22 12:58 ` li.haolin
2022-03-23 9:59 ` Simon Glass
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: li.haolin @ 2022-03-22 12:58 UTC (permalink / raw)
To: u-boot; +Cc: peng.fan, jh80.chung, sjg, philipp.tomsich, kever.yang, Haolin Li
From: Haolin Li <li.haolin@qq.com>
A pointer can not be negative. Use macro IS_ERR_OR_NULL() for checking.
Signed-off-by: Haolin Li <li.haolin@qq.com>
---
drivers/mmc/rockchip_sdhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index f3f9d83ba3..a46895299d 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: rockchip_sdhci: Correct error checking
2022-03-22 12:58 ` [PATCH] mmc: rockchip_sdhci: Correct error checking li.haolin
@ 2022-03-23 9:59 ` Simon Glass
2022-03-28 12:52 ` Kever Yang
2022-03-28 23:14 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2022-03-23 9:59 UTC (permalink / raw)
To: li.haolin
Cc: U-Boot Mailing List, Peng Fan, Jaehoon Chung, Philipp Tomsich,
Kever Yang
On Tue, 22 Mar 2022 at 06:58, <li.haolin@qq.com> wrote:
>
> From: Haolin Li <li.haolin@qq.com>
>
> A pointer can not be negative. Use macro IS_ERR_OR_NULL() for checking.
>
> Signed-off-by: Haolin Li <li.haolin@qq.com>
> ---
> drivers/mmc/rockchip_sdhci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: rockchip_sdhci: Correct error checking
2022-03-22 12:58 ` [PATCH] mmc: rockchip_sdhci: Correct error checking li.haolin
2022-03-23 9:59 ` Simon Glass
@ 2022-03-28 12:52 ` Kever Yang
2022-03-28 23:14 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Kever Yang @ 2022-03-28 12:52 UTC (permalink / raw)
To: li.haolin, u-boot; +Cc: peng.fan, jh80.chung, sjg, philipp.tomsich
Hi Haolin,
Thanks for your patch.
On 2022/3/22 20:58, li.haolin@qq.com wrote:
> From: Haolin Li <li.haolin@qq.com>
>
> 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: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> drivers/mmc/rockchip_sdhci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
> index f3f9d83ba3..a46895299d 100644
> --- a/drivers/mmc/rockchip_sdhci.c
> +++ b/drivers/mmc/rockchip_sdhci.c
> @@ -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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: rockchip_sdhci: Correct error checking
2022-03-22 12:58 ` [PATCH] mmc: rockchip_sdhci: Correct error checking li.haolin
2022-03-23 9:59 ` Simon Glass
2022-03-28 12:52 ` Kever Yang
@ 2022-03-28 23:14 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2022-03-28 23:14 UTC (permalink / raw)
To: li.haolin, u-boot; +Cc: peng.fan, sjg, philipp.tomsich, kever.yang
On 3/22/22 21:58, li.haolin@qq.com wrote:
> From: Haolin Li <li.haolin@qq.com>
>
> 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: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/rockchip_sdhci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
> index f3f9d83ba3..a46895299d 100644
> --- a/drivers/mmc/rockchip_sdhci.c
> +++ b/drivers/mmc/rockchip_sdhci.c
> @@ -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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-28 23:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220322125844epcas1p423b2ff07a11a0e40a13ac572a139ddf7@epcas1p4.samsung.com>
2022-03-22 12:58 ` [PATCH] mmc: rockchip_sdhci: Correct error checking li.haolin
2022-03-23 9:59 ` Simon Glass
2022-03-28 12:52 ` Kever Yang
2022-03-28 23:14 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).