Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/51126 )
Change subject: soc/rockchip/rk3399/sdram: Simplify error condition ......................................................................
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 moritzf@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/51126 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Julius Werner jwerner@chromium.org --- M src/soc/rockchip/rk3399/sdram.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Julius Werner: Looks good to me, approved
diff --git a/src/soc/rockchip/rk3399/sdram.c b/src/soc/rockchip/rk3399/sdram.c index 0fdef71..6d58b6a 100644 --- a/src/soc/rockchip/rk3399/sdram.c +++ b/src/soc/rockchip/rk3399/sdram.c @@ -1133,7 +1133,7 @@ * 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(); }