block/rnbd-clt: Check the return value of the function rtrs_clt_query
authorMd Haris Iqbal <haris.iqbal@cloud.ionos.com>
Wed, 28 Apr 2021 06:13:58 +0000 (08:13 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 May 2021 17:00:11 +0000 (11:00 -0600)
commit1056ad829ec43f9b705b507c2093b05e2088b0b7
treec05aef9cf34a7ea1365ea3d04086ab13aa457916
parent292660fa35e8917a78235d39722edf9bbc04cab7
block/rnbd-clt: Check the return value of the function rtrs_clt_query

In case none of the paths are in connected state, the function
rtrs_clt_query returns an error. In such a case, error out since the
values in the rtrs_attrs structure would be garbage.

Fixes: f7a7a5c228d45 ("block/rnbd: client: main functionality")
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Reviewed-by: Guoqing Jiang <guoqing.jiang@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Link: https://lore.kernel.org/r/20210428061359.206794-4-gi-oh.kim@ionos.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c