[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450205301-32207-2-git-send-email-computersforpeace@gmail.com>
Date: Tue, 15 Dec 2015 10:48:21 -0800
From: Brian Norris <computersforpeace@...il.com>
To: <linux-mtd@...ts.infradead.org>
Cc: <linux-kernel@...r.kernel.org>,
Brian Norris <computersforpeace@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Marek Vasut <marex@...x.de>,
Bayi Cheng <bayi.cheng@...iatek.com>,
Rafał Miłecki <zajec5@...il.com>,
Felix Fietkau <nbd@...nwrt.org>,
Eddie Huang (黃智傑)
<eddie.huang@...iatek.com>,
Milton Chiang (江明晏)
<Milton.Chiang@...iatek.com>
Subject: [PATCH for-4.4 2/2] mtd: spi-nor: fix stm_is_locked_sr() parameters
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.
Reported-by: Bayi Cheng <bayi.cheng@...iatek.com>
Signed-off-by: Brian Norris <computersforpeace@...il.com>
Cc: Bayi Cheng <bayi.cheng@...iatek.com>
---
drivers/mtd/spi-nor/spi-nor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index f5d59de1ee6e..32477c4eb421 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -516,8 +516,8 @@ static int stm_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len)
status_old = read_sr(nor);
/* Cannot unlock; would unlock larger region than requested */
- if (stm_is_locked_sr(nor, status_old, ofs - mtd->erasesize,
- mtd->erasesize))
+ if (stm_is_locked_sr(nor, ofs - mtd->erasesize, mtd->erasesize,
+ status_old))
return -EINVAL;
/*
--
2.6.0.rc2.230.g3dd15c0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists