From patchwork Tue Feb 19 05:14:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li RongQing X-Patchwork-Id: 10819187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56D6B922 for ; Tue, 19 Feb 2019 05:22:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FDD52B775 for ; Tue, 19 Feb 2019 05:22:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33F272BB00; Tue, 19 Feb 2019 05:22:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E12252B775 for ; Tue, 19 Feb 2019 05:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725780AbfBSFWc (ORCPT ); Tue, 19 Feb 2019 00:22:32 -0500 Received: from mx56.baidu.com ([61.135.168.56]:43911 "EHLO tc-sys-mailedm04.tc.baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725730AbfBSFWc (ORCPT ); Tue, 19 Feb 2019 00:22:32 -0500 X-Greylist: delayed 492 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Feb 2019 00:22:31 EST Received: from localhost (cp01-cos-dev01.cp01.baidu.com [10.92.119.46]) by tc-sys-mailedm04.tc.baidu.com (Postfix) with ESMTP id E5679236C005; Tue, 19 Feb 2019 13:14:07 +0800 (CST) From: Li RongQing To: linux-block@vger.kernel.org, josef@toxicpanda.com Subject: [PATCH] nbd: propagate genlmsg_reply return code Date: Tue, 19 Feb 2019 13:14:07 +0800 Message-Id: <1550553247-28077-1-git-send-email-lirongqing@baidu.com> X-Mailer: git-send-email 1.7.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP genlmsg_reply can fail, so propagate its return code Signed-off-by: Li RongQing --- drivers/block/nbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 7c9a949e876b..accb627fc158 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;