projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5fc144
)
io_uring: rsrc: Optimize return value variable 'ret'
author
Li zeming
<zeming@nfschina.com>
Fri, 17 Mar 2023 18:25:38 +0000
(
02:25
+0800)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 16 Mar 2023 01:59:11 +0000
(19:59 -0600)
The initialization assignment of the variable ret is changed to 0, only
in 'goto fail;' Use the ret variable as the function return value.
Signed-off-by: Li zeming <zeming@nfschina.com>
Link:
https://lore.kernel.org/r/20230317182538.3027-1-zeming@nfschina.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c
patch
|
blob
|
history
diff --git
a/io_uring/rsrc.c
b/io_uring/rsrc.c
index 056f40946ff68ff8d2d72781c5bdc9e3e303cea4..09a16d709cb558a6381b45b6a0d23b0ba7b98960 100644
(file)
--- a/
io_uring/rsrc.c
+++ b/
io_uring/rsrc.c
@@
-410,7
+410,7
@@
__cold static int io_rsrc_data_alloc(struct io_ring_ctx *ctx,
unsigned nr, struct io_rsrc_data **pdata)
{
struct io_rsrc_data *data;
- int ret =
-ENOMEM
;
+ int ret =
0
;
unsigned i;
data = kzalloc(sizeof(*data), GFP_KERNEL);