The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: alcooperx@gmail.com, kishon@ti.com, linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0
Date: Tue, 29 Oct 2019 01:59:45 +0530	[thread overview]
Message-ID: <20191028202945.GA29284@saurav> (raw)

Compare pointer-typed values to NULL rather than 0

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 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));
-- 
2.20.1


             reply	other threads:[~2019-10-28 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 20:29 Saurav Girepunje [this message]
2019-10-30  5:08 ` [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0 Kishon Vijay Abraham I
     [not found] <20191027184210.GA20258@saurav>
2019-10-28 18:26 ` Florian Fainelli

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=20191028202945.GA29284@saurav \
    --to=saurav.girepunje@gmail.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saurav.girepunje@hotmail.com \
    /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