[PATCH] phy: qcom-qmp-usb: Fix an NULL vs IS_ERR() bug
Johan Hovold
johan at kernel.org
Mon Apr 14 01:13:41 PDT 2025
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
More information about the linux-phy
mailing list