Skip to content

Commit 7904022

Browse files
Dan Carpenteraxboe
authored andcommitted
block/rnbd-clt-sysfs: fix a couple uninitialized variable bugs
These variables are printed on the error path if match_int() fails so they have to be initialized. Fixes: 2958a99 ("block/rnbd-clt: Support polling mode for IO latency optimization") Fixes: 1eb54f8 ("block/rnbd: client: sysfs interface functions") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Gioh Kim <[email protected]> Link: https://lore.kernel.org/r/20211012084443.GA31472@kili Signed-off-by: Jens Axboe <[email protected]>
1 parent 1dbdd99 commit 7904022

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/block/rnbd/rnbd-clt-sysfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ static int rnbd_clt_parse_map_options(const char *buf, size_t max_path_cnt,
7171
int opt_mask = 0;
7272
int token;
7373
int ret = -EINVAL;
74-
int i, dest_port, nr_poll_queues;
74+
int nr_poll_queues = 0;
75+
int dest_port = 0;
7576
int p_cnt = 0;
77+
int i;
7678

7779
options = kstrdup(buf, GFP_KERNEL);
7880
if (!options)

0 commit comments

Comments
 (0)