The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Arvind Yadav (2):
[PATCH 1/2] misc: aspeed-lpc-snoop: Fix platform_get_irq's error checking
[PATCH 2/2] misc: atmel-ssc: Fix platform_get_irq's error checking
drivers/misc/aspeed-lpc-snoop.c | 4 ++--
drivers/misc/atmel-ssc.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.7.4
From 1587133273896673719@xxx Mon Dec 18 14:44:00 +0000 2017
X-GM-THRID: 1584368805738064800
X-Gmail-Labels: Inbox,Category Forums
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/misc/aspeed-lpc-snoop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/aspeed-lpc-snoop.c b/drivers/misc/aspeed-lpc-snoop.c
index cb78c98..14c3c90 100644
--- a/drivers/misc/aspeed-lpc-snoop.c
+++ b/drivers/misc/aspeed-lpc-snoop.c
@@ -115,8 +115,8 @@ static int aspeed_lpc_snoop_config_irq(struct aspeed_lpc_snoop *lpc_snoop,
int rc;
lpc_snoop->irq = platform_get_irq(pdev, 0);
- if (!lpc_snoop->irq)
- return -ENODEV;
+ if (lpc_snoop->irq < 0)
+ return lpc_snoop->irq;
rc = devm_request_irq(dev, lpc_snoop->irq,
aspeed_lpc_snoop_irq, IRQF_SHARED,
--
2.7.4
From 1584303885493434236@xxx Fri Nov 17 09:12:04 +0000 2017
X-GM-THRID: 1584303885493434236
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread