From: Li RongQing Date: Tue, 19 Feb 2019 05:14:07 +0000 (+0800) Subject: nbd: propagate genlmsg_reply return code X-Git-Tag: v5.1-rc1~100^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd46eb89dff7f6390eaeb11013bb23aae196bbfc;p=thirdparty%2Flinux.git nbd: propagate genlmsg_reply return code genlmsg_reply can fail, so propagate its return code Signed-off-by: Li RongQing Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 32a7ba1674b71..90ba9f4c03f3b 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -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;