misc: rtsx_usb: set return value in rsp_buf alloc err path
[platform/kernel/linux-rpi.git] / drivers / misc / cardreader / rtsx_usb.c
index 4e21080..f150d87 100644 (file)
@@ -636,8 +636,10 @@ static int rtsx_usb_probe(struct usb_interface *intf,
                return -ENOMEM;
 
        ucr->rsp_buf = kmalloc(IOBUF_SIZE, GFP_KERNEL);
-       if (!ucr->rsp_buf)
+       if (!ucr->rsp_buf) {
+               ret = -ENOMEM;
                goto out_free_cmd_buf;
+       }
 
        usb_set_intfdata(intf, ucr);