We should unlock before returning.
Fixes: eda50cde58de ("iwlwifi: pcie: add context information support")
Signed-off-by: Dan Carpenter <[email protected]>
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index 302310dfef9e..4e84955d55c8 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -212,8 +212,10 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
goto out;
}
- if (iwl_pcie_ctxt_info_init(trans, fw))
- return -ENOMEM;
+ if (iwl_pcie_ctxt_info_init(trans, fw)) {
+ ret = -ENOMEM;
+ goto out;
+ }
/* re-check RF-Kill state since we may have missed the interrupt */
hw_rfkill = iwl_trans_check_hw_rf_kill(trans);
SGkgRGFuDQoNCk9uIEZyaSwgMjAxNy0wNC0yMSBhdCAxMzozOSArMDMwMCwgRGFuIENhcnBlbnRl
ciB3cm90ZToNCj4gV2Ugc2hvdWxkIHVubG9jayBiZWZvcmUgcmV0dXJuaW5nLg0KPiANCj4gRml4
ZXM6IGVkYTUwY2RlNThkZSAoIml3bHdpZmk6IHBjaWU6IGFkZCBjb250ZXh0IGluZm9ybWF0aW9u
IHN1cHBvcnQiKQ0KPiBTaWduZWQtb2ZmLWJ5OiBEYW4gQ2FycGVudGVyIDxkYW4uY2FycGVudGVy
QG9yYWNsZS5jb20+DQo+IA0KPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvd2lyZWxlc3MvaW50
ZWwvaXdsd2lmaS9wY2llL3RyYW5zLWdlbjIuYyBiL2RyaXZlcnMvbmV0L3dpcmVsZXNzL2ludGVs
L2l3bHdpZmkvcGNpZS90cmFucy1nZW4yLmMNCj4gaW5kZXggMzAyMzEwZGZlZjllLi40ZTg0OTU1
ZDU1YzggMTAwNjQ0DQo+IC0tLSBhL2RyaXZlcnMvbmV0L3dpcmVsZXNzL2ludGVsL2l3bHdpZmkv
cGNpZS90cmFucy1nZW4yLmMNCj4gKysrIGIvZHJpdmVycy9uZXQvd2lyZWxlc3MvaW50ZWwvaXds
d2lmaS9wY2llL3RyYW5zLWdlbjIuYw0KPiBAQCAtMjEyLDggKzIxMiwxMCBAQCBpbnQgaXdsX3Ry
YW5zX3BjaWVfZ2VuMl9zdGFydF9mdyhzdHJ1Y3QgaXdsX3RyYW5zICp0cmFucywNCj4gIAkJZ290
byBvdXQ7DQo+ICAJfQ0KPiAgDQo+IC0JaWYgKGl3bF9wY2llX2N0eHRfaW5mb19pbml0KHRyYW5z
LCBmdykpDQo+IC0JCXJldHVybiAtRU5PTUVNOw0KPiArCWlmIChpd2xfcGNpZV9jdHh0X2luZm9f
aW5pdCh0cmFucywgZncpKSB7DQo+ICsJCXJldCA9IC1FTk9NRU07DQo+ICsJCWdvdG8gb3V0Ow0K
PiArCX0NCj4gIA0KPiAgCS8qIHJlLWNoZWNrIFJGLUtpbGwgc3RhdGUgc2luY2Ugd2UgbWF5IGhh
dmUgbWlzc2VkIHRoZSBpbnRlcnJ1cHQgKi8NCj4gIAlod19yZmtpbGwgPSBpd2xfdHJhbnNfY2hl
Y2tfaHdfcmZfa2lsbCh0cmFucyk7DQoNClRoYW5rcyBmb3IgeW91ciBwYXRjaCEgQnV0IHRoaXMg
aGFzIGFscmVhZHkgYmVlbiBmaXhlZCBieSBKb2hhbm5lcyBpbg0KdGhlIHBhdGNoIEkgc2VudCBv
dXQgeWVzdGVyZGF5WzFdLg0KDQpbMV0gaHR0cHM6Ly93d3cuc3Bpbmljcy5uZXQvbGlzdHMvbGlu
dXgtd2lyZWxlc3MvbXNnMTYxNTgyLmh0bWwNCg0KLS0NCkNoZWVycywNCkx1Y2Eu
Dan Carpenter <[email protected]> writes:
> We should unlock before returning.
>
> Fixes: eda50cde58de ("iwlwifi: pcie: add context information support")
> Signed-off-by: Dan Carpenter <[email protected]>
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
> index 302310dfef9e..4e84955d55c8 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
> @@ -212,8 +212,10 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
> goto out;
> }
>
> - if (iwl_pcie_ctxt_info_init(trans, fw))
> - return -ENOMEM;
> + if (iwl_pcie_ctxt_info_init(trans, fw)) {
> + ret = -ENOMEM;
> + goto out;
> + }
This was recently fixed:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=97b00d877bb8c2e499b9d0c07b65bd92b4e91ddd
--
Kalle Valo