2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

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 <bgolaszewski@baylibre.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bartosz Golaszewski 2018-09-21 06:40:09 -07:00 committed by Greg Kroah-Hartman
parent c1de7f43bd
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;
}