Fix null pointer reference in nvmem_unregister
Bugzilla: https://bugzilla.redhat.com/2124820
Tested: Verified that this commit resoves the panic
commit 8c751e0d9a5264376935a84429a2d468c8877d99 Author: Andy Shevchenko andriy.shevchenko@linux.intel.com Date: Sun Feb 20 15:15:17 2022 +0000
nvmem: core: Check input parameter for NULL in nvmem_unregister()
nvmem_unregister() frees resources and standard pattern is to allow
caller to not care if it's NULL or not. This will reduce burden on
the callers to perform this check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220220151527.17216-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Arcari darcari@redhat.com
Edited by David Arcari