public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: dulshani.gunawardhana89@gmail.com
Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org
Subject: re: staging: media: Use dev_err() instead of pr_err()
Date: Tue, 5 Nov 2013 23:26:05 +0300	[thread overview]
Message-ID: <20131105202605.GH3949@elgon.mountain> (raw)

Hello Dulshani Gunawardhana,

The patch 44ee8e801137: "staging: media: Use dev_err() instead of 
pr_err()" from Oct 20, 2013, leads to the following
GCC warning: 

drivers/staging/media/go7007/go7007-usb.c: In function ‘go7007_usb_probe’:
drivers/staging/media/go7007/go7007-usb.c:1100:13: warning: ‘go’ may be used uninitialized in this function [-Wuninitialized]

drivers/staging/media/go7007/go7007-usb.c
  1049  static int go7007_usb_probe(struct usb_interface *intf,
  1050                  const struct usb_device_id *id)
  1051  {
  1052          struct go7007 *go;
  1053          struct go7007_usb *usb;
  1054          const struct go7007_usb_board *board;
  1055          struct usb_device *usbdev = interface_to_usbdev(intf);
  1056          unsigned num_i2c_devs;
  1057          char *name;
  1058          int video_pipe, i, v_urb_len;
  1059  
  1060          dev_dbg(go->dev, "probing new GO7007 USB board\n");
                        ^^^^^^^
  1061  
  1062          switch (id->driver_info) {
  1063          case GO7007_BOARDID_MATRIX_II:
  1064                  name = "WIS Matrix II or compatible";
  1065                  board = &board_matrix_ii;
  1066                  break;

There are several other uses of "go" before it has been initialized.

Probably you will just want to change these back to pr_info().  Some of
the messages are not very useful like:
	dev_info(go->dev, "Sensoray 2250 found\n");
You can delete that one.

regards,
dan carpenter


             reply	other threads:[~2013-11-05 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 20:26 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-14 13:08 Fw: staging: media: Use dev_err() instead of pr_err() Mauro Carvalho Chehab
2013-11-15  6:29 ` Greg Kroah-Hartman
2013-11-17 12:03   ` Mauro Carvalho Chehab
2013-11-19  0:47     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131105202605.GH3949@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dulshani.gunawardhana89@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox