projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
742b1f9
)
NFC: pn544_i2c: Fix null pointer exception when not using platform data
author
Clement Perrochaud
<clement.perrochaud@nxp.com>
Tue, 8 Apr 2014 11:13:49 +0000
(11:13 +0000)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 21 Apr 2014 22:37:29 +0000
(
00:37
+0200)
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>
drivers/nfc/pn544/i2c.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/pn544/i2c.c
b/drivers/nfc/pn544/i2c.c
index
5239e3b
..
440291a
100644
(file)
--- a/
drivers/nfc/pn544/i2c.c
+++ b/
drivers/nfc/pn544/i2c.c
@@
-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;
}