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

Commit c253a62d authored by Brian Norris's avatar Brian Norris Committed by Kalle Valo
Browse files

mwifiex: fixup init_channel_scan_gap error case



In reading through _mwifiex_fw_dpc(), I noticed that after we've
registered our wiphy, we still have error paths that don't free it back
up. Let's do that.

Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6417dba3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -588,7 +588,7 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context)
	if (mwifiex_init_channel_scan_gap(adapter)) {
		mwifiex_dbg(adapter, ERROR,
			    "could not init channel stats table\n");
		goto err_init_fw;
		goto err_init_chan_scan;
	}

	if (driver_mode) {
@@ -636,6 +636,7 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context)

err_add_intf:
	vfree(adapter->chan_stats);
err_init_chan_scan:
	wiphy_unregister(adapter->wiphy);
	wiphy_free(adapter->wiphy);
err_init_fw: