public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: amelie.delaunay@st.com (Amelie DELAUNAY)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next] phy: stm32: fix using 0 as NULL pointer warnings
Date: Tue, 20 Mar 2018 13:21:48 +0000	[thread overview]
Message-ID: <3d799714-6e2c-658e-b1f2-def58584c356@st.com> (raw)
In-Reply-To: <1521551982-154471-1-git-send-email-weiyongjun1@huawei.com>



On 03/20/2018 02:19 PM, Wei Yongjun wrote:
> Fixes the following sparse warnings:
> 
> drivers/phy/st/phy-stm32-usbphyc.c:331:42: warning:
>   Using plain integer as NULL pointer
> drivers/phy/st/phy-stm32-usbphyc.c:344:52: warning:
>   Using plain integer as NULL pointer
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/phy/st/phy-stm32-usbphyc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
> index bc4e78a..48d4086 100644
> --- a/drivers/phy/st/phy-stm32-usbphyc.c
> +++ b/drivers/phy/st/phy-stm32-usbphyc.c
> @@ -328,7 +328,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
>   	if (IS_ERR(usbphyc->base))
>   		return PTR_ERR(usbphyc->base);
>   
> -	usbphyc->clk = devm_clk_get(dev, 0);
> +	usbphyc->clk = devm_clk_get(dev, NULL);
>   	if (IS_ERR(usbphyc->clk)) {
>   		ret = PTR_ERR(usbphyc->clk);
>   		dev_err(dev, "clk get failed: %d\n", ret);
> @@ -341,7 +341,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
>   		return ret;
>   	}
>   
> -	usbphyc->rst = devm_reset_control_get(dev, 0);
> +	usbphyc->rst = devm_reset_control_get(dev, NULL);
>   	if (!IS_ERR(usbphyc->rst)) {
>   		reset_control_assert(usbphyc->rst);
>   		udelay(2);
> 

Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com>

Thanks,
Amelie

      reply	other threads:[~2018-03-20 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 13:19 [PATCH -next] phy: stm32: fix using 0 as NULL pointer warnings Wei Yongjun
2018-03-20 13:21 ` Amelie DELAUNAY [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=3d799714-6e2c-658e-b1f2-def58584c356@st.com \
    --to=amelie.delaunay@st.com \
    --cc=linux-arm-kernel@lists.infradead.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