[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AS4PR04MB96927A45E8D179F69853F48FE765A@AS4PR04MB9692.eurprd04.prod.outlook.com>
Date: Mon, 26 May 2025 07:23:24 +0000
From: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Amitkumar Karwar
<amitkumar.karwar@....com>, Marcel Holtmann <marcel@...tmann.org>, Luiz
Augusto von Dentz <luiz.dentz@...il.com>, Nathan Chancellor
<nathan@...nel.org>, Nick Desaulniers <nick.desaulniers+lkml@...il.com>, Bill
Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return
value check
Hi Krzysztof,
Thank you for the fix.
Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
Thanks,
Neeraj
> 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: c50b56664e48 ("Bluetooth: btnxpuart: Implement host-wakeup
> feature")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
> drivers/bluetooth/btnxpuart.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index b34623a69b8a..6b13feed06df 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -533,6 +533,8 @@ static int ps_setup(struct hci_dev *hdev)
> ps_host_wakeup_irq_handler,
> IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
> dev_name(&serdev->dev), nxpdev);
> + if (ret)
> + bt_dev_info(hdev, "error setting wakeup IRQ
> + handler, ignoring\n");
> disable_irq(psdata->irq_handler);
> device_init_wakeup(&serdev->dev, true);
> }
> --
> 2.45.2
Powered by blists - more mailing lists