Skip to content

Commit f6bf3d6

Browse files
JiangJiasgregkh
authored andcommitted
Bluetooth: hci_bcm: Check for error irq
[ Upstream commit b38cd3b ] For the possible failure of the platform_get_irq(), the returned irq could be error number and will finally cause the failure of the request_irq(). Consider that platform_get_irq() can now in certain cases return -EPROBE_DEFER, and the consequences of letting request_irq() effectively convert that into -EINVAL, even at probe time rather than later on. So it might be better to check just now. Fixes: 0395ffc ("Bluetooth: hci_bcm: Add PM for BCM devices") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f5e4f68 commit f6bf3d6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/bluetooth/hci_bcm.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,12 @@ static int bcm_probe(struct platform_device *pdev)
11641164
return -ENOMEM;
11651165

11661166
dev->dev = &pdev->dev;
1167-
dev->irq = platform_get_irq(pdev, 0);
1167+
1168+
ret = platform_get_irq(pdev, 0);
1169+
if (ret < 0)
1170+
return ret;
1171+
1172+
dev->irq = ret;
11681173

11691174
/* Initialize routing field to an unused value */
11701175
dev->pcm_int_params[0] = 0xff;

0 commit comments

Comments
 (0)