mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
mmc: Fix static checker warnings
Correct pointer dereferencing check to be more consistent. Eliminate the below smatch warning: drivers/mmc/mmc.c:3118 mmc_init_device() warn: variable dereferenced before check 'm' (see line 3116) Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
7ff2f30b63
commit
337af54a36
1 changed files with 4 additions and 2 deletions
|
@ -3113,10 +3113,12 @@ int mmc_init_device(int num)
|
|||
}
|
||||
|
||||
m = mmc_get_mmc_dev(dev);
|
||||
m->user_speed_mode = MMC_MODES_END; /* Initialising user set speed mode */
|
||||
|
||||
if (!m)
|
||||
return 0;
|
||||
|
||||
/* Initialising user set speed mode */
|
||||
m->user_speed_mode = MMC_MODES_END;
|
||||
|
||||
if (m->preinit)
|
||||
mmc_start_init(m);
|
||||
|
||||
|
|
Loading…
Reference in a new issue