[U-Boot] [PATCH 1/7] usb: Don't init pointer to zero, but NULL
Chin Liang See
clsee at altera.com
Wed May 4 11:35:13 CEST 2016
On Wed, 2016-05-04 at 09:36 +0200, Stefan Roese wrote:
> On 03.05.2016 22:51, Marek Vasut wrote:
> > The pointer should always be inited to NULL, not zero (0). These
> > are
> > two different things and not necessarily equal.
> >
> > Signed-off-by: Marek Vasut <marex at denx.de>
> > Cc: Chin Liang See <clsee at altera.com>
> > Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
> > Cc: Hans de Goede <hdegoede at redhat.com>
> > Cc: Stefan Roese <sr at denx.de>
> > Cc: Stephen Warren <swarren at nvidia.com>
> > ---
> > common/usb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common/usb.c b/common/usb.c
> > index 4d0de4d..63429d4 100644
> > --- a/common/usb.c
> > +++ b/common/usb.c
> > @@ -1064,7 +1064,7 @@ static int usb_prepare_device(struct
> > usb_device *dev, int addr, bool do_read,
> >
> > int usb_select_config(struct usb_device *dev)
> > {
> > - unsigned char *tmpbuf = 0;
> > + unsigned char *tmpbuf = NULL;
> > int err;
> >
> > err = get_descriptor_len(dev, USB_DT_DEVICE_SIZE,
> > USB_DT_DEVICE_SIZE);
> >
>
> Reviewed-by: Stefan Roese <sr at denx.de>
>
Reviewed-by: Chin Liang See <clsee at altera.com>
Tested-by: Chin Liang See <clsee at altera.com>
Thanks
Chin Liang
> Thanks,
> Stefan
More information about the U-Boot
mailing list