diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-21 15:26:55 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-19 08:52:14 -0500 |
commit | 4683ae86267f22dcd490953400c1d3fa12bcaccd (patch) | |
tree | a5313c9b7bec2a99d8d5640155616560bca49d18 /drivers/usb | |
parent | f2af74123f8c5a735248547f4286a3adc28633c1 (diff) |
usb: gadget: f_rndis: fix an error code on allocation failure
This should be return -ENOMEM. The current code returns successs.
Fixes: de7a8d2d534f ('usb: gadget: f_rndis: OS descriptors support')
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index eed3ad878047..31274f70c4b9 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -687,7 +687,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) f->os_desc_table = kzalloc(sizeof(*f->os_desc_table), GFP_KERNEL); if (!f->os_desc_table) - return PTR_ERR(f->os_desc_table); + return -ENOMEM; f->os_desc_n = 1; f->os_desc_table[0].os_desc = &rndis_opts->rndis_os_desc; } |