]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
fabrics: Do not overwrite errno with return code
authorDaniel Wagner <dwagner@suse.de>
Mon, 16 Jan 2023 13:44:40 +0000 (14:44 +0100)
committerDaniel Wagner <dwagner@suse.de>
Fri, 20 Jan 2023 07:47:49 +0000 (08:47 +0100)
commitd2b6263e8f4b58d5b01bd6d6c6a71ff12e49945b
tree788cf21a7b32c8fd4c51e7aa0b133f3146a839e8
parent3b9b9fd5dd97b3b2a322650c4e54e17ba49d589a
fabrics: Do not overwrite errno with return code

__create_discover_ctrl() is calling nvmf_add_ctrl() which sets errno
when something doesn't work. Hence we should not overwrite the errno
with the return code in __ctrl_discover_ctrl().

This prevents to propagate the errno code to the callside and the
nvme_strerror(errno) call is just return 'unknown error -1'.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
fabrics.c