Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}