nbd: propagate genlmsg_reply return code
authorLi RongQing <lirongqing@baidu.com>
Tue, 19 Feb 2019 05:14:07 +0000 (13:14 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 Feb 2019 21:06:37 +0000 (14:06 -0700)
genlmsg_reply can fail, so propagate its return code

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c

index 32a7ba1..90ba9f4 100644 (file)
@@ -2118,8 +2118,7 @@ static int nbd_genl_status(struct sk_buff *skb, struct genl_info *info)
        }
        nla_nest_end(reply, dev_list);
        genlmsg_end(reply, reply_head);
-       genlmsg_reply(reply, info);
-       ret = 0;
+       ret = genlmsg_reply(reply, info);
 out:
        mutex_unlock(&nbd_index_mutex);
        return ret;