gadgetfs: set the error code
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 27 Feb 2016 18:34:24 +0000 (20:34 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 28 Feb 2016 01:55:13 +0000 (03:55 +0200)
Fixes: 98a0e0adabd49 ('gadgetfs: Fix leak on error in aio_read()')

drivers/usb/gadget/inode.c

index ce7253b..59240b5 100644 (file)
@@ -640,6 +640,7 @@ fail:
                priv->iv = kmemdup(iv, nr_segs * sizeof(struct iovec),
                                   GFP_KERNEL);
                if (!priv->iv) {
+                       value = -ENOMEM;
                        kfree(priv);
                        goto fail;
                }