V4L/DVB (3202): Initialize the dvb-usb-device-pointer to NULL
authorPatrick Boettcher <pb@linuxtv.org>
Mon, 9 Jan 2006 17:25:33 +0000 (15:25 -0200)
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>
Mon, 9 Jan 2006 17:25:33 +0000 (15:25 -0200)
- 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 <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
drivers/media/dvb/dvb-usb/dvb-usb-init.c

index 2f9c3638adcf58b9d627156291a2ab208d4fa412..2e23060cbbca736c4f8a0ea690ee3a893d36b9e9 100644 (file)
@@ -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;