From: Greg KH <greg@kroah.com>
To: Ma Ke <make24@iscas.ac.cn>
Cc: vkoul@kernel.org, kishon@kernel.org, ansuelsmth@gmail.com,
agross@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] phy: qualcomm: Check NULL ptr on data
Date: Wed, 14 Aug 2024 16:49:56 +0200 [thread overview]
Message-ID: <2024081448-garden-module-40f7@gregkh> (raw)
In-Reply-To: <20240814141125.50763-1-make24@iscas.ac.cn>
On Wed, Aug 14, 2024 at 10:11:25PM +0800, Ma Ke wrote:
> Check NULL ptr on data, verify that data is not NULL before using it.
>
> Cc: stable@vger.kernel.org
> Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver")
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
> ---
> drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
> index 06392ed7c91b..9b9fd9c1b1f7 100644
> --- a/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
> @@ -492,6 +492,8 @@ static int qcom_ipq806x_usb_phy_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> data = of_device_get_match_data(&pdev->dev);
> + if (!data)
> + return -ENODEV;
When will this ever fail?
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
prev parent reply other threads:[~2024-08-14 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 14:11 [PATCH] phy: qualcomm: Check NULL ptr on data Ma Ke
2024-08-14 14:49 ` Greg KH [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=2024081448-garden-module-40f7@gregkh \
--to=greg@kroah.com \
--cc=agross@codeaurora.org \
--cc=ansuelsmth@gmail.com \
--cc=kishon@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=make24@iscas.ac.cn \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).