linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: zzam@gentoo.org
Cc: Matthias Schwarzott <zzam@gentoo.org>, linux-media@vger.kernel.org
Subject: re: [media] si2165: Add demod driver for DVB-T only
Date: Fri, 1 Aug 2014 18:23:00 +0300	[thread overview]
Message-ID: <20140801152300.GA614@mwanda> (raw)

Hello Matthias Schwarzott,

The patch 3e54a1697ace: "[media] si2165: Add demod driver for DVB-T
only" from Jul 22, 2014, leads to the following static checker
warning:

	drivers/media/dvb-frontends/si2165.c:329 si2165_wait_init_done()
	warn: signedness bug returning '(-22)'

drivers/media/dvb-frontends/si2165.c
   315  static bool si2165_wait_init_done(struct si2165_state *state)
   316  {
   317          int ret = -EINVAL;
   318          u8 val = 0;
   319          int i;
   320  
   321          for (i = 0; i < 3; ++i) {
   322                  si2165_readreg8(state, 0x0054, &val);
   323                  if (val == 0x01)
   324                          return 0;

This is the success path?

   325                  usleep_range(1000, 50000);
   326          }
   327          dev_err(&state->i2c->dev, "%s: init_done was not set\n",
   328                  KBUILD_MODNAME);
   329          return ret;

-EINVAL becomes 1 when casted to bool.

   330  }

regards,
dan carpenter

             reply	other threads:[~2014-08-01 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 15:23 Dan Carpenter [this message]
2014-08-02 12:37 ` [media] si2165: Add demod driver for DVB-T only Matthias Schwarzott

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=20140801152300.GA614@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-media@vger.kernel.org \
    --cc=zzam@gentoo.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;
as well as URLs for NNTP newsgroup(s).