mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/staging/chunkeey.git] / target / linux / bcm4908 / patches-5.4 / 083-v5.5-0002-phy-phy-brcm-usb-init-fix-use-of-integer-as-pointer.patch
1 From 1025cb924bd517f3c458f36973582d4c2adedd6a Mon Sep 17 00:00:00 2001
2 From: Ben Dooks <ben.dooks@codethink.co.uk>
3 Date: Tue, 15 Oct 2019 17:03:32 +0100
4 Subject: [PATCH] phy: phy-brcm-usb-init: fix use of integer as pointer
5
6 The xhci_ec_base variable is a pointer, so don't compare
7 it with an integer.
8
9 Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
10 Reviewed-by: Andrew Murray <andrew.murray@arm.com>
11 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
12 ---
13 drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/phy/broadcom/phy-brcm-usb-init.c
17 +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
18 @@ -707,7 +707,7 @@ static void brcmusb_usb3_otp_fix(struct
19 void __iomem *xhci_ec_base = params->xhci_ec_regs;
20 u32 val;
21
22 - if (params->family_id != 0x74371000 || xhci_ec_base == 0)
23 + if (params->family_id != 0x74371000 || !xhci_ec_base)
24 return;
25 brcmusb_writel(0xa20c, USB_XHCI_EC_REG(xhci_ec_base, IRAADR));
26 val = brcmusb_readl(USB_XHCI_EC_REG(xhci_ec_base, IRADAT));