UBI: fix check for "too many bytes"
authorBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 10:23:28 +0000 (02:23 -0800)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:08:11 +0000 (13:08 +0000)
commit976e2ade0b7383a639e2f75ffbc93f78d7113a83
treea5d12d8fc31708e55100bca65d9ad88b8f0f3cca
parent5e4f4a711e7e1c79e5151da25205b58b39ddb95d
UBI: fix check for "too many bytes"

commit 299d0c5b27346a77a0777c993372bf8777d4f2e5 upstream.

The comparison from the previous line seems to have been erroneously
(partially) copied-and-pasted onto the next. The second line should be
checking req.bytes, not req.lnum.

Coverity CID #139400

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
[rw: Fixed comparison]
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/cdev.c