mtd: m25p80: consider max message size in m25p80_read
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 28 Oct 2016 05:58:46 +0000 (07:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:27:35 +0000 (14:27 +0200)
commitf61de8ef5c905ccc959099118986c4a18ba92f1b
treeae2567b6dbccd177624fee2971fb1fd4744e3911
parent78a65505cdf7b7392c963d3715269516bc812ef2
mtd: m25p80: consider max message size in m25p80_read

commit 9e276de6a367cde07c1a63522152985d4e5cca8b upstream.

Consider a message size limit when calculating the maximum amount
of data that can be read.

The message size limit has been introduced with 4.9, so cc it
to stable.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/devices/m25p80.c