Skip to content

Commit

Permalink
V4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init()
Browse files Browse the repository at this point in the history
If in a cold state and the download succeeded ret is zero, but we
should return -ENOMEM.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Roel Kluin authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent ca39d84 commit 407df29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/dvb-usb-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ int dvb_usb_device_init(struct usb_interface *intf,
d = kzalloc(sizeof(struct dvb_usb_device),GFP_KERNEL);
if (d == NULL) {
err("no memory for 'struct dvb_usb_device'");
return ret;
return -ENOMEM;
}

d->udev = udev;
Expand Down

0 comments on commit 407df29

Please sign in to comment.