mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-19 16:39:31 +01:00
NFC: nfcmrvl: free reset gpio
Reset GPIO shall be freed by the driver since the device used in devm_ calls can be still valid on unregister. If user removes the module and inserts it again, the devm_gpio_request will fail because the underlying physical device (e.g i2c) was not removed so the device management won't have freed the gpio. Signed-off-by: Vincent Cuissard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
1 parent
d2d2e6456e
commit
b2fe288eac
1 file changed
+3
@@ -194,6 +194,9 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)
|
||||
|
||||
nfcmrvl_fw_dnld_deinit(priv);
|
||||
|
||||
if (priv->config.reset_n_io)
|
||||
devm_gpio_free(priv->dev, priv->config.reset_n_io);
|
||||
|
||||
nci_unregister_device(ndev);
|
||||
nci_free_device(ndev);
|
||||
kfree(priv);
|
||||
|
||||
Reference in new issue
Block a user