mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
NFC: pn544_i2c: Fix null pointer exception when not using platform data
Fixes a null pointer exception occurring when the IRQ request in pn544_hci_i2c_probe fails and no platform data is available. Signed-off-by: Clément Perrochaud <clement.perrochaud@nxp.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
742b1f9fa2
commit
12b25dbf11
@ -1029,8 +1029,12 @@ err_hci:
|
||||
free_irq(client->irq, phy);
|
||||
|
||||
err_rti:
|
||||
if (pdata->free_resources != NULL)
|
||||
if (!pdata) {
|
||||
gpio_free(phy->gpio_en);
|
||||
gpio_free(phy->gpio_fw);
|
||||
} else if (pdata->free_resources) {
|
||||
pdata->free_resources();
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user