Re: [PATCHv2] staging: go7007: fix use of uninitialised pointer

2013-11-25 Thread Greg Kroah-Hartman
On Mon, Nov 11, 2013 at 12:46:24PM +0100, Michal Nazarewicz wrote:
> go variable is initialised only after the switch case so it cannot be
> dereferenced prior to that happening.
> 
> Signed-off-by: Michal Nazarewicz 
> ---
>  drivers/staging/media/go7007/go7007-usb.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> On Sun, Nov 10 2013, Dan Carpenter wrote:
> > There are 3 other uses before "go" gets initialized.
> 
> Argh...  Other occurrences of the letters “GO” deceived my eyes.  Sorry
> about that and thanks.

This is no longer needed, as I revertd the patch that caused the
original problems, sorry.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2] staging: go7007: fix use of uninitialised pointer

2013-11-11 Thread Dan Carpenter
On Mon, Nov 11, 2013 at 12:46:24PM +0100, Michal Nazarewicz wrote:
> go variable is initialised only after the switch case so it cannot be
> dereferenced prior to that happening.
> 
> Signed-off-by: Michal Nazarewicz 

Looks good.  Thanks.  :)

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv2] staging: go7007: fix use of uninitialised pointer

2013-11-11 Thread Michal Nazarewicz
go variable is initialised only after the switch case so it cannot be
dereferenced prior to that happening.

Signed-off-by: Michal Nazarewicz 
---
 drivers/staging/media/go7007/go7007-usb.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

On Sun, Nov 10 2013, Dan Carpenter wrote:
> There are 3 other uses before "go" gets initialized.

Argh...  Other occurrences of the letters “GO” deceived my eyes.  Sorry
about that and thanks.

diff --git a/drivers/staging/media/go7007/go7007-usb.c 
b/drivers/staging/media/go7007/go7007-usb.c
index 58684da..ee8ab89 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -1057,7 +1057,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
char *name;
int video_pipe, i, v_urb_len;
 
-   dev_dbg(go->dev, "probing new GO7007 USB board\n");
+   dev_dbg(&intf->dev, "probing new GO7007 USB board\n");
 
switch (id->driver_info) {
case GO7007_BOARDID_MATRIX_II:
@@ -1097,13 +1097,13 @@ static int go7007_usb_probe(struct usb_interface *intf,
board = &board_px_tv402u;
break;
case GO7007_BOARDID_LIFEVIEW_LR192:
-   dev_err(go->dev, "The Lifeview TV Walker Ultra is not 
supported. Sorry!\n");
+   dev_err(&intf->dev, "The Lifeview TV Walker Ultra is not 
supported. Sorry!\n");
return -ENODEV;
name = "Lifeview TV Walker Ultra";
board = &board_lifeview_lr192;
break;
case GO7007_BOARDID_SENSORAY_2250:
-   dev_info(go->dev, "Sensoray 2250 found\n");
+   dev_info(&intf->dev, "Sensoray 2250 found\n");
name = "Sensoray 2250/2251";
board = &board_sensoray_2250;
break;
@@ -1112,7 +1112,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
board = &board_ads_usbav_709;
break;
default:
-   dev_err(go->dev, "unknown board ID %d!\n",
+   dev_err(&intf->dev, "unknown board ID %d!\n",
(unsigned int)id->driver_info);
return -ENODEV;
}
-- 
1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html