summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu/serdes
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-07-30 20:40:43 +0200
committerTom Rini <trini@konsulko.com>2017-08-13 15:17:28 -0400
commita22bbfda6edd3cba79496b9d02077d5ae64ff4b0 (patch)
treeda0cfad251fc7da7a4529d1e273355779c39f6ed /arch/arm/mach-mvebu/serdes
parenta5981734a4412eae6ac536c8bd50d3add665352f (diff)
downloadu-boot-a22bbfda6edd3cba79496b9d02077d5ae64ff4b0.tar.gz
u-boot-a22bbfda6edd3cba79496b9d02077d5ae64ff4b0.tar.xz
u-boot-a22bbfda6edd3cba79496b9d02077d5ae64ff4b0.zip
arm: mvebu: avoid possible NULL dereference
It does not make sense to check if info is NULL after dereferencing it. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm/mach-mvebu/serdes')
-rw-r--r--arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
index b0e193b78c..525576a4fc 100644
--- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
@@ -354,16 +354,16 @@ int serdes_phy_config(void)
}
info = board_serdes_cfg_get(PEX_MODE_GET(satr11));
- DEBUG_INIT_FULL_S("info->line0_7= 0x");
- DEBUG_INIT_FULL_D(info->line0_7, 8);
- DEBUG_INIT_FULL_S(" info->line8_15= 0x");
- DEBUG_INIT_FULL_D(info->line8_15, 8);
- DEBUG_INIT_FULL_S("\n");
if (info == NULL) {
DEBUG_INIT_S("Hight speed PHY Error #1\n");
return MV_ERROR;
}
+ DEBUG_INIT_FULL_S("info->line0_7= 0x");
+ DEBUG_INIT_FULL_D(info->line0_7, 8);
+ DEBUG_INIT_FULL_S(" info->line8_15= 0x");
+ DEBUG_INIT_FULL_D(info->line8_15, 8);
+ DEBUG_INIT_FULL_S("\n");
if (config_module & ETM_MODULE_DETECT) { /* step 0.9 ETM */
DEBUG_INIT_FULL_S("ETM module detect Step 0.9:\n");