Skip to content

Commit

Permalink
block/rnbd-clt-sysfs: fix a couple uninitialized variable bugs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Dan Carpenter authored and axboe committed Oct 12, 2021
1 parent 1dbdd99 commit 7904022
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/block/rnbd/rnbd-clt-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ static int rnbd_clt_parse_map_options(const char *buf, size_t max_path_cnt,
int opt_mask = 0;
int token;
int ret = -EINVAL;
int i, dest_port, nr_poll_queues;
int nr_poll_queues = 0;
int dest_port = 0;
int p_cnt = 0;
int i;

options = kstrdup(buf, GFP_KERNEL);
if (!options)
Expand Down

0 comments on commit 7904022

Please sign in to comment.