ddr_tool: coverity fix [1/1]

PD#SWPL-190779

Problem:
coverity fix

Solution:
coverity fix

Verify:
local

Change-Id: I63c28cec53c2395760eb0a12c53891cdc6110886
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
This commit is contained in:
qinglin.li
2024-11-05 14:39:24 +08:00
committed by gongwei.chen
parent bcb6acfaec
commit 97075ea85d
+3
View File
@@ -152,6 +152,7 @@ static void s6_dmc_vio_to_port(void *data, unsigned long *vio_bit)
*vio_bit = DMC_VIO_PROT1 | DMC_VIO_PROT0;
port = (mon_comm->status >> 10) & 0x1f;
subport = mon_comm->status & 0x3ff;
if (port == 0x01 || port == 0x02 || port == 0x03) //vpu
subport = mon_comm->status & 0xff;
if (port == 0x0e) //device
@@ -235,6 +236,7 @@ static int s6_reg_analysis(char *input, char *output)
addr |= vio_reg2;
port = (vio_reg3 >> 10) & 0x1f;
subport = vio_reg3 & 0x3ff;
if (port == 0x01 || port == 0x02 || port == 0x03) //vpu
subport = vio_reg3 & 0xff;
if (port == 0x0e) //device
@@ -254,6 +256,7 @@ static int s6_reg_analysis(char *input, char *output)
addr |= vio_reg0;
port = (vio_reg1 >> 10) & 0x1f;
subport = vio_reg1 & 0x3ff;
if (port == 0x01 || port == 0x02 || port == 0x03) //vpu
subport = vio_reg1 & 0xff;
if (port == 0x0e) //device