Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34530 )
Change subject: soc/nvidia/tegra210: Add null pointer check ......................................................................
soc/nvidia/tegra210: Add null pointer check
Check that tx is not null before accessing it, similar to the previous if statements.
Change-Id: I820cb670026bb12a54c63227aa04e778fd49c66a Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1294805 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34530 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net --- M src/soc/nvidia/tegra210/dsi.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/nvidia/tegra210/dsi.c b/src/soc/nvidia/tegra210/dsi.c index ae20d44..a383ff2 100644 --- a/src/soc/nvidia/tegra210/dsi.c +++ b/src/soc/nvidia/tegra210/dsi.c @@ -769,7 +769,7 @@ tegra_dsi_writel(dsi, value, DSI_WR_DATA);
/* write payload (if any) */ - if (msg->tx_len > 2) { + if (tx && msg->tx_len > 2) { for (j = 2; j < msg->tx_len; j += 4) { value = 0;