Commit 424d7033 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Greg Kroah-Hartman

nvmem: sunxi_sid: return -ENOMEM if kzalloc() fails

The driver currently returns -EINVAL if kzalloc() fails in probe().
Change it to -ENOMEM as it should be.
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1de7f43
......@@ -187,7 +187,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
randomness = kzalloc(size, GFP_KERNEL);
if (!randomness) {
ret = -EINVAL;
ret = -ENOMEM;
goto err_unreg_nvmem;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment