projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36cdc20
)
dio: return -ENOMEM when kzalloc() fails
author
Salah Triki
<salah.triki@gmail.com>
Fri, 2 Jul 2021 13:31:14 +0000
(14:31 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 13:53:24 +0000
(15:53 +0200)
Return -ENOMEM when kzalloc() fails in order to inform the caller of the
failure.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Link:
https://lore.kernel.org/r/20210702133114.GA314157@pc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dio/dio.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dio/dio.c
b/drivers/dio/dio.c
index 193b40e7aec033f6eb88e7d73ba32208a3ca9efc..4c06c93c93d32f59f04d45001e23b21861d3116b 100644
(file)
--- a/
drivers/dio/dio.c
+++ b/
drivers/dio/dio.c
@@
-219,7
+219,7
@@
static int __init dio_init(void)
/* Found a board, allocate it an entry in the list */
dev = kzalloc(sizeof(struct dio_dev), GFP_KERNEL);
if (!dev)
- return
0
;
+ return
-ENOMEM
;
dev->bus = &dio_bus;
dev->dev.parent = &dio_bus.dev;