All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mrechberger@gmail.com
Cc: linux-media@vger.kernel.org
Subject: re: [PATCH] v4l: 790: added support for terratec cinergy 250 usb
Date: Thu, 21 Apr 2016 13:11:21 +0300	[thread overview]
Message-ID: <20160421101121.GA712@mwanda> (raw)

Hello Markus Rechberger,

The patch e43f14af1439: "[PATCH] v4l: 790: added support for terratec
cinergy 250 usb" from Nov 8, 2005, leads to the following static
checker warning:

	drivers/media/usb/em28xx/em28xx-input.c:307 em28xx_i2c_ir_handle_key()
	error: uninitialized symbol 'protocol'.

drivers/media/usb/em28xx/em28xx-input.c
    84  static int em28xx_get_key_terratec(struct i2c_client *i2c_dev,
    85                                     enum rc_type *protocol, u32 *scancode)
    86  {
    87          unsigned char b;
    88  
    89          /* poll IR chip */
    90          if (1 != i2c_master_recv(i2c_dev, &b, 1))
    91                  return -EIO;
    92  
    93          /* it seems that 0xFE indicates that a button is still hold
    94             down, while 0xff indicates that no button is hold down. */
    95  
    96          if (b == 0xff)
    97                  return 0;
    98  
    99          if (b == 0xfe)
   100                  /* keep old data */
   101                  return 1;

This is only called from em28xx_i2c_ir_handle_key() and the "old data"
is uninitialized garbage.

   102  
   103          *protocol = RC_TYPE_UNKNOWN;
   104          *scancode = b;
   105          return 1;
   106  }

regards,
dan carpenter

                 reply	other threads:[~2016-04-21 10:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160421101121.GA712@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mrechberger@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.