mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
mmc: core: Dereference dev pointer after NULL check
Dereference dev pointer after NULL check. Change-Id: I39bc175eb53ff486577672b1c3175475bbf394e2 Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
This commit is contained in:
parent
e0f5b51058
commit
ca95a2bdb5
1 changed files with 5 additions and 1 deletions
|
|
@ -224,12 +224,16 @@ int mmc_of_parse(struct mmc_host *host)
|
|||
bool cd_cap_invert, cd_gpio_invert = false;
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
const char *lower_bus_speed = NULL;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct device_node *np;
|
||||
#endif
|
||||
|
||||
if (!dev || !dev_fwnode(dev))
|
||||
return 0;
|
||||
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
np = dev->of_node;
|
||||
#endif
|
||||
|
||||
/* "bus-width" is translated to MMC_CAP_*_BIT_DATA flags */
|
||||
if (device_property_read_u32(dev, "bus-width", &bus_width) < 0) {
|
||||
dev_dbg(host->parent,
|
||||
|
|
|
|||
Loading…
Reference in a new issue