From: Roel Kluin Date: Tue, 2 Feb 2010 14:29:46 +0000 (-0300) Subject: V4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init() X-Git-Tag: accepted/tizen/common/20141203.182822~12730^2~149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=407df29363f10642d87dbe49854c97eb57c84c94;p=platform%2Fkernel%2Flinux-arm64.git V4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init() If in a cold state and the download succeeded ret is zero, but we should return -ENOMEM. Signed-off-by: Roel Kluin Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c index e331db8..5d91f70 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c @@ -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;