mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
nfc: nfcmrvl: Fix irq_of_parse_and_map() return value
commit 5a478a653b4cca148d5c89832f007ec0809d7e6d upstream.
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Reported-by: Lv Ruyi <[email protected]>
Fixes: caf6e49bf6 ("NFC: nfcmrvl: add spi driver")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
893825289b
commit
37287fd28f
2 changed files with 6 additions and 6 deletions
|
|
@ -186,9 +186,9 @@ static int nfcmrvl_i2c_parse_dt(struct device_node *node,
|
|||
pdata->irq_polarity = IRQF_TRIGGER_RISING;
|
||||
|
||||
ret = irq_of_parse_and_map(node, 0);
|
||||
if (ret < 0) {
|
||||
pr_err("Unable to get irq, error: %d\n", ret);
|
||||
return ret;
|
||||
if (!ret) {
|
||||
pr_err("Unable to get irq\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
pdata->irq = ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,9 +129,9 @@ static int nfcmrvl_spi_parse_dt(struct device_node *node,
|
|||
}
|
||||
|
||||
ret = irq_of_parse_and_map(node, 0);
|
||||
if (ret < 0) {
|
||||
pr_err("Unable to get irq, error: %d\n", ret);
|
||||
return ret;
|
||||
if (!ret) {
|
||||
pr_err("Unable to get irq\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
pdata->irq = ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue