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: Bartosz Golaszewski <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Bartosz Golaszewski 2018-09-21 06:40:09 -07:00 • committed by Greg Kroah-Hartman
commit 424d7033ad

View file

@ -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;
}