Skip to content

Commit b38cd3b

Browse files
JiangJiasholtmann
authored andcommitted
Bluetooth: hci_bcm: Check for error irq
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 <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 710ad98 commit b38cd3b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/bluetooth/hci_bcm.c

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

11901190
dev->dev = &pdev->dev;
1191-
dev->irq = platform_get_irq(pdev, 0);
1191+
1192+
ret = platform_get_irq(pdev, 0);
1193+
if (ret < 0)
1194+
return ret;
1195+
1196+
dev->irq = ret;
11921197

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

0 commit comments

Comments
 (0)