Skip to content

Commit edc14f2

Browse files
krzkVudentz
authored andcommitted
Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
Return value of devm_request_irq() must be checked (function is even annotated) and without it clang W=1 complains: btnxpuart.c:494:6: error: unused variable 'ret' [-Werror,-Wunused-variable] Setting up wakeup IRQ handler is not really critical, because the handler is empty, so just log the informational message so user could submit proper bug report and silences the clang warning. Fixes: c50b566 ("Bluetooth: btnxpuart: Implement host-wakeup feature") Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Neeraj Sanjay Kale <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 03f1700 commit edc14f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/bluetooth/btnxpuart.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ static int ps_setup(struct hci_dev *hdev)
533533
ps_host_wakeup_irq_handler,
534534
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
535535
dev_name(&serdev->dev), nxpdev);
536+
if (ret)
537+
bt_dev_info(hdev, "error setting wakeup IRQ handler, ignoring\n");
536538
disable_irq(psdata->irq_handler);
537539
device_init_wakeup(&serdev->dev, true);
538540
}

0 commit comments

Comments
 (0)