From 2d541cbcbe90217df107e1ac0c4adb76d647b283 Mon Sep 17 00:00:00 2001 From: Jiafei Pan Date: Fri, 2 Sep 2022 11:07:15 +0800 Subject: [PATCH] fix(nxp-ddr): fix coverity issue Fixed coverity issue for "shifting by a negtive value", returned before go to the next shifting code. Signed-off-by: Jiafei Pan Change-Id: I00171b057b8948cb9e9ec5d9405b2e32aba568fb --- drivers/nxp/ddr/phy-gen2/phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nxp/ddr/phy-gen2/phy.c b/drivers/nxp/ddr/phy-gen2/phy.c index e914ddb76..5fd9cb5c5 100644 --- a/drivers/nxp/ddr/phy-gen2/phy.c +++ b/drivers/nxp/ddr/phy-gen2/phy.c @@ -2296,6 +2296,7 @@ static void parse_odt(const unsigned int val, if (i < 0 || i > 3) { printf("Error: invalid chip-select value\n"); + return; } switch (val) { case DDR_ODT_CS: -- 2.39.5