1 From f4853e1c321edb48af229ad5ac85076790d34968 Mon Sep 17 00:00:00 2001
2 From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
3 Date: Fri, 15 Feb 2019 11:42:59 +0100
4 Subject: nvmem: core: don't check the return value of notifier chain call
6 From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
8 commit f4853e1c321edb48af229ad5ac85076790d34968 upstream.
10 blocking_notifier_call_chain() returns the value returned by the last
11 registered callback. A positive return value doesn't indicate an error
12 and an nvmem device should correctly register irrespective of any
13 notifier callback failures. Drop the retval check.
15 Fixes: bee1138bea15 ("nvmem: add a notifier chain")
16 Cc: stable@vger.kernel.org
17 Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
18 Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 drivers/nvmem/core.c | 4 +---
23 1 file changed, 1 insertion(+), 3 deletions(-)
25 --- a/drivers/nvmem/core.c
26 +++ b/drivers/nvmem/core.c
27 @@ -686,9 +686,7 @@ struct nvmem_device *nvmem_register(cons
29 goto err_remove_cells;
31 - rval = blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
33 - goto err_remove_cells;
34 + blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);