misc: at25: Check proper value of chip length in FRAM case
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 25 Nov 2021 21:27:29 +0000 (23:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Dec 2021 13:25:22 +0000 (14:25 +0100)
commit58589a75bba96f43b62d8069b35be081bc00d7c3
treeb0214abc4e36c260555faeb8c01f0f84a6533658
parenta692fc39bf90913f3cea57ee240ea5d6338da235
misc: at25: Check proper value of chip length in FRAM case

Obviously the byte_len value should be checked from the chip
and not from at25->chip.

Fixes: fd307a4ad332 ("nvmem: prepare basics for FRAM support")
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211125212729.86585-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at25.c