From patchwork Sat Dec 3 10:55:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pan Bian X-Patchwork-Id: 9459605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB62660756 for ; Sat, 3 Dec 2016 10:56:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6D652846B for ; Sat, 3 Dec 2016 10:56:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEAEC28489; Sat, 3 Dec 2016 10:56:12 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 6CCBD28489 for ; Sat, 3 Dec 2016 10:56:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751804AbcLCKz5 (ORCPT ); Sat, 3 Dec 2016 05:55:57 -0500 Received: from m50-133.163.com ([123.125.50.133]:39600 "EHLO m50-133.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbcLCKz4 (ORCPT ); Sat, 3 Dec 2016 05:55:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=yCoU1+USxiW2hY+PW4 kGQxsc/bIDIH2iTjTtXsP/5f0=; b=MMPAcbNwKkZpi0XmLQGbuR0mSIovb5QXjP lXu41N/WthwZjjkCPDO6fjms3a0e0fuI9tUf/HYtY8me4j2niRTvZe1BpPdx3hVZ FuEAnKYiGJD1i65u1goGA2d/DcmJvOeVKHiOIGnkBAV57I0b7edtP8pYPOXsWy1e 0xNSttpn8= Received: from localhost.localdomain (unknown [222.131.246.88]) by smtp3 (Coremail) with SMTP id DdGowADHYKiTpEJYUTc0Iw--.23025S3; Sat, 03 Dec 2016 18:55:18 +0800 (CST) From: Pan Bian To: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Pan Bian Subject: [PATCH 1/1] btrfs: fix improper return value Date: Sat, 3 Dec 2016 18:55:16 +0800 Message-Id: <1480762516-5002-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: DdGowADHYKiTpEJYUTc0Iw--.23025S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr4fZFy7Ww17Kr4UKr4kZwb_yoW3Jwb_GF yxA3y8KF4rJw1kWr1rGrWSqFWag340gryvqa45GFZxKw17Kan8ZFs2grs0k3s5Za1aqFy5 GFZaqa4UC3W7GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5zwZ5UUUUU== X-Originating-IP: [222.131.246.88] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/xtbBzxY1claDscc1lgAAse Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret on errors. However, it directly returns 0. It may be better to return ret. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731 Signed-off-by: Pan Bian --- fs/btrfs/uuid-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/uuid-tree.c b/fs/btrfs/uuid-tree.c index 7fc89e4..44bcc1f 100644 --- a/fs/btrfs/uuid-tree.c +++ b/fs/btrfs/uuid-tree.c @@ -353,5 +353,5 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info, btrfs_free_path(path); if (ret) btrfs_warn(fs_info, "btrfs_uuid_tree_iterate failed %d", ret); - return 0; + return ret; }