From 1e192138d19f0d6d049d06a7a799095c200f04de Mon Sep 17 00:00:00 2001 From: Moritz Fischer Date: Sun, 28 Feb 2021 19:26:37 -0800 Subject: [PATCH] soc/rockchip/rk3399/sdram: Simplify error condition There is no need for explicit 0 comparison, any return value not equal to 0 is treated as error. Change-Id: I72612af4108a616b6247ee68c8ac2a53242b0853 Signed-off-by: Moritz Fischer Reviewed-on: https://review.coreboot.org/c/coreboot/+/51126 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Julius Werner --- src/soc/rockchip/rk3399/sdram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/rockchip/rk3399/sdram.c b/src/soc/rockchip/rk3399/sdram.c index 0fdef715c0..6d58b6a171 100644 --- a/src/soc/rockchip/rk3399/sdram.c +++ b/src/soc/rockchip/rk3399/sdram.c @@ -1133,7 +1133,7 @@ void sdram_init(const struct rk3399_sdram_params *params) * step may fail, before that, we just reset the * system, and start again. */ - if (pctl_cfg(channel, params) != 0) { + if (pctl_cfg(channel, params)) { printk(BIOS_ERR, "pctl_cfg fail, reset\n"); board_reset(); }