[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d3e2fca7-3552-bf98-f455-7cd27f04336c@ti.com>
Date: Wed, 30 Oct 2019 10:38:33 +0530
From: Kishon Vijay Abraham I <kishon@...com>
To: Saurav Girepunje <saurav.girepunje@...il.com>,
<alcooperx@...il.com>, <linux-kernel@...r.kernel.org>,
<bcm-kernel-feedback-list@...adcom.com>
CC: <saurav.girepunje@...mail.com>
Subject: Re: [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer
to 0
Hi,
On 29/10/19 1:59 AM, Saurav Girepunje wrote:
> Compare pointer-typed values to NULL rather than 0
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
I've already merged a patch by Ben Dooks for fixing this
https://lore.kernel.org/r/20191015160332.15244-2-ben.dooks@codethink.co.uk
Thanks
Kishon
> ---
> drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadcom/phy-brcm-usb-init.c
> index 3c53625f8bc2..2ea1e84b544b 100644
> --- a/drivers/phy/broadcom/phy-brcm-usb-init.c
> +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
> @@ -707,7 +707,7 @@ static void brcmusb_usb3_otp_fix(struct brcm_usb_init_params *params)
> void __iomem *xhci_ec_base = params->xhci_ec_regs;
> u32 val;
>
> - if (params->family_id != 0x74371000 || xhci_ec_base == 0)
> + if (params->family_id != 0x74371000 || xhci_ec_base == NULL)
> return;
> brcmusb_writel(0xa20c, USB_XHCI_EC_REG(xhci_ec_base, IRAADR));
> val = brcmusb_readl(USB_XHCI_EC_REG(xhci_ec_base, IRADAT));
>
Powered by blists - more mailing lists