Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f6827e5 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: Dereference dev pointer after NULL check"

parents 2cb1a30f ca95a2bd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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,