lkml.org 
[lkml]   [2013]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: go7007: fix use of uninitialised pointer
On Sun, Nov 10, 2013 at 07:37:57PM +0100, Michal Nazarewicz wrote:
> From: Michal Nazarewicz <mina86@mina86.com>
>
> The go variable is declade without initialisation and invocation of
> dev_dbg immediatelly tries to dereference it.
> ---
> drivers/staging/media/go7007/go7007-usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
> index 58684da..457ab63 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");
> + pr_debug("probing new GO7007 USB board\n");

Please either delete this entirely, or use the struct device in the
usb_interface pointer.

A driver should never have a "raw" pr_* call.

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-11-10 20:01    [W:1.156 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site