nvmem: properly handle returned value nvmem_reg_read
authorMathieu Malaterre <malat@debian.org>
Fri, 11 May 2018 11:07:03 +0000 (12:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:55:22 +0000 (07:55 +0200)
commit30ac755c76c33b43b17f7cff8f015b6f4176d522
tree325b76a5f58f682e47c61fbac37da2bafc8a3426
parent202a0cf0c0e70deeafec09c5a1bfd404c2acf6ba
nvmem: properly handle returned value nvmem_reg_read

[ Upstream commit 50808bfcc14b854775a9f1d0abe3dac2babcf5c3 ]

Function nvmem_reg_read can return a non zero value indicating an error.
This returned value must be read and error propagated to
nvmem_cell_prepare_write_buffer. Silence the following gcc warning (W=1):

drivers/nvmem/core.c:1093:9: warning: variable 'rc' set but
 not used [-Wunused-but-set-variable]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c