summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-09-21 06:40:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:14:54 +0200
commit424d7033add17ce897305242901e14df1ff90195 (patch)
tree3aa2a927d1519ccc55c744ba2670d650eb4be396 /drivers/nvmem
parentc1de7f43bd84271e438a4f2dadc4ba9a353baaea (diff)
downloadlinux-424d7033add17ce897305242901e14df1ff90195.tar.bz2
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>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/sunxi_sid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index d020f89248fd..4d0b7e72aa2e 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -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;
}