]> git.baikalelectronics.ru Git - kernel.git/commit
nvmem: core: return error code instead of NULL from nvmem_device_get
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 7 Aug 2018 12:19:35 +0000 (13:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2018 07:46:46 +0000 (09:46 +0200)
commitd94b1410eff1a3efd841dc609b2c038417b88eec
treee1c7b6bd2b493ac5c7833bbb92695d2b2af8d06b
parent16692f3a2c1d6b94e93ef1d5207f53ea38a9d711
nvmem: core: return error code instead of NULL from nvmem_device_get

nvmem_device_get() should return ERR_PTR() on error or valid pointer
on success, but one of the code path seems to return NULL, so fix it.

Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c