Re: [PATCH] usb: ohci-nxp: fix use of integer as pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2019 at 10:19 AM Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx> wrote:
>
> The hcd pointer in ohci_hcd_nxp_probe() is
> being initialised with a 0, so fix to NULL to
> avoid the following sparse warning:
>
> drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
> ---
[...]

> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void)
>
>  static int ohci_hcd_nxp_probe(struct platform_device *pdev)
>  {
> -       struct usb_hcd *hcd = 0;
> +       struct usb_hcd *hcd = NULL;
>         const struct hc_driver *driver = &ohci_nxp_hc_driver;
>         struct resource *res;
>         int ret = 0, irq;
> --
> 2.23.0
>
Acked-by: Sylvain Lemieux <slemieux.tyco@xxxxxxxxx>



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux