[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALGdzuo2qn-Eq=UgsSpkEvR4ZZgGKb=ETepWBoeMCf_x0J5kQQ@mail.gmail.com>
Date: Mon, 14 Apr 2025 07:52:11 -0500
From: Chenyuan Yang <chenyuan0y@...il.com>
To: Johan Hovold <johan@...nel.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, vkoul@...nel.org, kishon@...nel.org, lumag@...nel.org,
quic_kriskura@...cinc.com, manivannan.sadhasivam@...aro.org,
konrad.dybcio@....qualcomm.com, quic_varada@...cinc.com,
quic_kbajaj@...cinc.com, johan+linaro@...nel.org,
linux-arm-msm@...r.kernel.org, linux-phy@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] phy: qcom-qmp-usb: Fix an NULL vs IS_ERR() bug
Hi Johan and Krzysztof,
On Mon, Apr 14, 2025 at 3:13 AM Johan Hovold <johan@...nel.org> wrote:
>
> On Mon, Apr 14, 2025 at 10:08:18AM +0200, Krzysztof Kozlowski wrote:
> > On 14/04/2025 09:40, Johan Hovold wrote:
>
> > > I'm afraid you're mistaken here. See __devm_ioremap() which can return
> > > NULL.
> > >
> > Uh, you are right, I only checked devm_of_iomap in qmp_usb_iomap().
> > Anyway, the fix should be different - given function should either
> > return ERR or NULL, not both, so devm_ioremap return value needs to be
> > wrapped in ERR_PTR.
>
> Right, I already suggested that:
>
> https://lore.kernel.org/lkml/Z_yxxoa12N9rNn2z@hovoldconsulting.com/
>
> Johan
I have submitted "[PATCH v2] phy: qcom-qmp-usb: Fix an NULL vs
IS_ERR() bug", which fixes this issue based on your suggestions
-Chenyuan
Powered by blists - more mailing lists