[1/7] staging: go7007: fix use of uninitialised pointer

Message ID 87fvr480o9.fsf@mina86.com (mailing list archive)
State Superseded, archived
Delegated to: Mauro Carvalho Chehab
Headers

Commit Message

Michal Nazarewicz Nov. 10, 2013, 8:24 p.m. UTC
  Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
---
 drivers/staging/media/go7007/go7007-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

On Sun, Nov 10 2013, Greg Kroah-Hartman wrote:
> Please either delete this entirely, or use the struct device in the
> usb_interface pointer.
>
> A driver should never have a "raw" pr_* call.
  

Comments

Dan Carpenter Nov. 10, 2013, 9:06 p.m. UTC | #1
There are 3 other uses before "go" gets initialized.

regards,
dan carpenter

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

Patch

diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
index 58684da..e8c708c 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: