]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/nvmem-core-don-t-check-the-return-value-of-notifier-chain-call.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / queue-5.0 / nvmem-core-don-t-check-the-return-value-of-notifier-chain-call.patch
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
5
6 From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
7
8 commit f4853e1c321edb48af229ad5ac85076790d34968 upstream.
9
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.
14
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>
20
21 ---
22 drivers/nvmem/core.c | 4 +---
23 1 file changed, 1 insertion(+), 3 deletions(-)
24
25 --- a/drivers/nvmem/core.c
26 +++ b/drivers/nvmem/core.c
27 @@ -686,9 +686,7 @@ struct nvmem_device *nvmem_register(cons
28 if (rval)
29 goto err_remove_cells;
30
31 - rval = blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
32 - if (rval)
33 - goto err_remove_cells;
34 + blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
35
36 return nvmem;
37