1
0
Fork 0

nvmem: meson-efuse: add error message on user_max failure.

Add an explicit error message when SM_EFUSE_USER_MAX command fails

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Jerome Brunet 2018-11-30 11:53:21 +00:00 committed by Greg Kroah-Hartman
parent 1668845366
commit 8649dbe58d
1 changed files with 3 additions and 1 deletions

View File

@ -48,8 +48,10 @@ static int meson_efuse_probe(struct platform_device *pdev)
struct nvmem_config *econfig;
unsigned int size;
if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0)
if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) {
dev_err(dev, "failed to get max user");
return -EINVAL;
}
econfig = devm_kzalloc(dev, sizeof(*econfig), GFP_KERNEL);
if (!econfig)