This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-dvb.git tree:
Subject: V4L/DVB: remove unneeded null check in anysee_probe() Author: Dan Carpenter <[email protected]> Date: Mon May 31 16:27:39 2010 -0300 Smatch complained because "d" is dereferenced first and then checked for null later . The only code path where "d" could be a invalid pointer is if this is a cold device in dvb_usb_device_init(). I consulted Antti Palosaari and he explained that anysee is always a warm device. I have added a comment and removed the unneeded null check. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/dvb/dvb-usb/anysee.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=e0f3e32097bce379859f5b82b09f56178c14aebf diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index faca1ad..aa5c7d5 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c @@ -463,6 +463,11 @@ static int anysee_probe(struct usb_interface *intf, if (intf->num_altsetting < 1) return -ENODEV; + /* + * Anysee is always warm (its USB-bridge, Cypress FX2, uploads + * firmware from eeprom). If dvb_usb_device_init() succeeds that + * means d is a valid pointer. + */ ret = dvb_usb_device_init(intf, &anysee_properties, THIS_MODULE, &d, adapter_nr); if (ret) @@ -479,10 +484,7 @@ static int anysee_probe(struct usb_interface *intf, if (ret) return ret; - if (d) - ret = anysee_init(d); - - return ret; + return anysee_init(d); } static struct usb_device_id anysee_table[] = { _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
