mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe
[ Upstream commitc3d66a164c
] platform_get_irq() returns negative error number instead 0 on failure. And the doc of platform_get_irq() provides a usage example: int irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; Fix the check of return value to catch errors correctly. Fixes:cdd5de500b
("soc: ti: Add wkup_m3_ipc driver") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Dave Gerlach <d-gerlach@ti.com> Link: https://lore.kernel.org/r/20220114062840.16620-1-linmq006@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e8bf862410
commit
03e01cdcbb
1 changed files with 2 additions and 2 deletions
|
@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(m3_ipc->ipc_mem_base);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq) {
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "no irq resource\n");
|
||||
return -ENXIO;
|
||||
return irq;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(dev, irq, wkup_m3_txev_handler,
|
||||
|
|
Loading…
Reference in a new issue