]> git.baikalelectronics.ru Git - kernel.git/commit
misc: at25: Don't copy garbage to the at25->chip in FRAM case
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 25 Nov 2021 21:27:28 +0000 (23:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Dec 2021 13:25:22 +0000 (14:25 +0100)
commitd4e5c2e1886cc80d6f6bbcd9fe7b9629bd82ab48
treef34937fb371edde5e76e74ec2e070f3309b578e6
parent4a8be5e28438e0f068a6ec4119de63daaeefb5c3
misc: at25: Don't copy garbage to the at25->chip in FRAM case

Even if we know that we are going to fill everything later on
it's bad style and fragile to copy garbage from the stack to
the data structure that will be used in the driver.

Fixes: 33cfd6c0ba18 ("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-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at25.c