Skip to content

Commit 424d703

Browse files
brglgregkh
authored andcommitted
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]>
1 parent c1de7f4 commit 424d703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvmem/sunxi_sid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
187187

188188
randomness = kzalloc(size, GFP_KERNEL);
189189
if (!randomness) {
190-
ret = -EINVAL;
190+
ret = -ENOMEM;
191191
goto err_unreg_nvmem;
192192
}
193193

0 commit comments

Comments
 (0)