From: Patrick Boettcher Date: Mon, 9 Jan 2006 17:25:33 +0000 (-0200) Subject: V4L/DVB (3202): Initialize the dvb-usb-device-pointer to NULL X-Git-Tag: v2.6.16-rc1~663^2~68 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=6ff5ef28bad0403fbc24cdee127d094449a10ab6;p=cascardo%2Flinux.git V4L/DVB (3202): Initialize the dvb-usb-device-pointer to NULL - Initialize the the dvb-usb-device-pointer in the -init function to NULL, to be sure that a dvb-usb-device was really initialized. Signed-off-by: Patrick Boettcher 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 2f9c3638adcf..2e23060cbbca 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c @@ -138,6 +138,9 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties int ret = -ENOMEM,cold=0; + if (du != NULL) + *du = NULL; + if ((desc = dvb_usb_find_device(udev,props,&cold)) == NULL) { deb_err("something went very wrong, device was not found in current device list - let's see what comes next.\n"); return -ENODEV;