]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
nvmem: core: don't check the return value of notifier chain call
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 15 Feb 2019 10:42:59 +0000 (11:42 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 25 Mar 2019 15:45:20 +0000 (10:45 -0500)
BugLink: https://bugs.launchpad.net/bugs/1821607
commit f4853e1c321edb48af229ad5ac85076790d34968 upstream.

blocking_notifier_call_chain() returns the value returned by the last
registered callback. A positive return value doesn't indicate an error
and an nvmem device should correctly register irrespective of any
notifier callback failures. Drop the retval check.

Fixes: bee1138bea15 ("nvmem: add a notifier chain")
Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/nvmem/core.c

index f7301bb4ef3bc667480b96b77d68eac3fc6d4fab..3ce65927e11cec3cf95148b1e0b6228a9289a7b2 100644 (file)
@@ -686,9 +686,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
        if (rval)
                goto err_remove_cells;
 
-       rval = blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
-       if (rval)
-               goto err_remove_cells;
+       blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
 
        return nvmem;