mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Caleb Connolly <caleb.connolly@linaro.org>
To: Chen Ni <nichen@iscas.ac.cn>,
	agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, quic_schowdhu@quicinc.com,
	gregkh@linuxfoundation.org
Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: misc: eud: Add IRQ check for platform_get_irq()
Date: Thu, 2 Nov 2023 16:06:54 +0000	[thread overview]
Message-ID: <ba16e523-82cf-47a3-8ed3-24ef116faf66@linaro.org> (raw)
In-Reply-To: <20231102075113.1043358-1-nichen@iscas.ac.cn>



On 02/11/2023 07:51, Chen Ni wrote:
> The function eud_probe() should check the return value of
> platform_get_irq() for errors so as to not pass a negative value to
> the devm_request_threaded_irq().
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   drivers/usb/misc/qcom_eud.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c
> index 7f371ea1248c..26e9b8749d8a 100644
> --- a/drivers/usb/misc/qcom_eud.c
> +++ b/drivers/usb/misc/qcom_eud.c
> @@ -205,6 +205,9 @@ static int eud_probe(struct platform_device *pdev)
>   		return PTR_ERR(chip->mode_mgr);
>   
>   	chip->irq = platform_get_irq(pdev, 0);
> +	if (chip->irq < 0)
> +		return chip->irq;
> +
>   	ret = devm_request_threaded_irq(&pdev->dev, chip->irq, handle_eud_irq,
>   			handle_eud_irq_thread, IRQF_ONESHOT, NULL, chip);
>   	if (ret)

-- 
// Caleb (they/them)

      reply	other threads:[~2023-11-02 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  7:51 Chen Ni
2023-11-02 16:06 ` Caleb Connolly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba16e523-82cf-47a3-8ed3-24ef116faf66@linaro.org \
    --to=caleb.connolly@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=quic_schowdhu@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®