]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
f_rockusb: Use NULL instead of 0 for pointers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 3 Dec 2020 15:32:03 +0000 (17:32 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 31 Jan 2021 13:08:56 +0000 (14:08 +0100)
get_rkusb() mistakenly uses integers without cast.
Convert them to proper type.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/usb/gadget/f_rockusb.c

index 9ae02ae78c1e6fcd1441e54484b7d614b8566737..9dd10f9e9aa1084fe3d92aeeb9110d31284f423d 100644 (file)
@@ -110,7 +110,7 @@ struct f_rockusb *get_rkusb(void)
        if (!f_rkusb) {
                f_rkusb = memalign(CONFIG_SYS_CACHELINE_SIZE, sizeof(*f_rkusb));
                if (!f_rkusb)
-                       return 0;
+                       return NULL;
 
                rockusb_func = f_rkusb;
                memset(f_rkusb, 0, sizeof(*f_rkusb));
@@ -120,7 +120,7 @@ struct f_rockusb *get_rkusb(void)
                f_rkusb->buf_head = memalign(CONFIG_SYS_CACHELINE_SIZE,
                                             RKUSB_BUF_SIZE);
                if (!f_rkusb->buf_head)
-                       return 0;
+                       return NULL;
 
                f_rkusb->buf = f_rkusb->buf_head;
                memset(f_rkusb->buf_head, 0, RKUSB_BUF_SIZE);