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:
parent
c1de7f43bd
commit
424d7033ad
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user