mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Colin King <colin.king@canonical.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Johannes Berg <johannes.berg@intel.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFC: fdp: fix signed less or equal zero check in u8 max_size
Date: Mon, 4 Jun 2018 06:18:12 +0200	[thread overview]
Message-ID: <20180604041812.GB8977@zurbaran.ger.intel.com> (raw)
In-Reply-To: <20180130153359.524-1-colin.king@canonical.com>

Hi Colin,

On Tue, Jan 30, 2018 at 03:33:59PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The u8 variable max_size is being assigned a return value from the
> call to nci_conn_max_data_pkt_payload_size that can return a -ve
> error return. Since max_size is a u8, the -ve check for the error will
> always be false. Fix this by making max_size an int type.
> 
> Detected using Coccinelle:
> drivers/nfc/fdp/fdp.c:208:5-13: WARNING: Unsigned expression compared
> with zero: max_size <= 0
> 
> Fixes: a06347c04c13 ("NFC: Add Intel Fields Peak NFC solution driver")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/nfc/fdp/fdp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
Applied to nfc-next, thanks.

Cheers,
Samuel.

      reply	other threads:[~2018-06-04  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 15:33 Colin King
2018-06-04  4:18 ` Samuel Ortiz [this message]

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=20180604041812.GB8977@zurbaran.ger.intel.com \
    --to=sameo@linux.intel.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=johannes.berg@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@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

all inboxes | Powered by JetHome®