linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
To: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-mtd@lists.infradead.org
Cc: Andrey Utkin <andrey.krieger.utkin@gmail.com>,
	adrian.hunter@intel.com, dcb314@hotmail.com, dedekind1@gmail.com
Subject: [PATCH 5/5] fs/ubifs/{sb, super}.c: drop negativity check on unsigned value
Date: Fri, 18 Jul 2014 18:35:25 +0300	[thread overview]
Message-ID: <1405697725-23866-1-git-send-email-andrey.krieger.utkin@gmail.com> (raw)

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80581
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 fs/ubifs/sb.c    | 2 +-
 fs/ubifs/super.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 4c37607..c2c3d13 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -447,7 +447,7 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup)
 		goto failed;
 	}
 
-	if (c->default_compr < 0 || c->default_compr >= UBIFS_COMPR_TYPES_CNT) {
+	if (c->default_compr >= UBIFS_COMPR_TYPES_CNT) {
 		err = 13;
 		goto failed;
 	}
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index e5bd068..9c59c10 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -75,7 +75,7 @@ static int validate_inode(struct ubifs_info *c, const struct inode *inode)
 		return 1;
 	}
 
-	if (ui->compr_type < 0 || ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
+	if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
 		ubifs_err("unknown compression type %d", ui->compr_type);
 		return 2;
 	}
-- 
1.8.5.5

             reply	other threads:[~2014-07-18 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 15:35 Andrey Utkin [this message]
2014-07-19  9:23 ` [PATCH 5/5] fs/ubifs/{sb,super}.c: drop negativity check on unsigned value Artem Bityutskiy

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=1405697725-23866-1-git-send-email-andrey.krieger.utkin@gmail.com \
    --to=andrey.krieger.utkin@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dcb314@hotmail.com \
    --cc=dedekind1@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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).