From patchwork Mon Feb 25 17:41:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10828977 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 988EE17E9 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EFDA2B283 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 738592B77B; Mon, 25 Feb 2019 17:41:43 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 26D5C2B283 for ; Mon, 25 Feb 2019 17:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbfBYRll (ORCPT ); Mon, 25 Feb 2019 12:41:41 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:47956 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728796AbfBYRlj (ORCPT ); Mon, 25 Feb 2019 12:41:39 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1PHcWju114466 for ; Mon, 25 Feb 2019 17:41:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Gxeq0cxqiae7gyOW82aFNUJyJkxWHgNMrzPSzf4Fg3Y=; b=oklsW1dC+eWZ8KFdw/1MwYzcaOZ0mUBAKBdTv9zKJAq1zzeXORcJNZVC2cfqyWIWgKL7 rrf8SV5Pnz/sD51KL6Zesw2eteCL7qxlGq3wTq0lLBV8jpVhDaMXng6KpEEIdjhLUz8f w29gpUIkD+AjHI09ZfxS5nE9CWIIwC30PH6PonsAexl3ZeHIveSciYmOlsY+8PQDlaYY wpkR7QvY1ZEyfus0yWtBSOzLldNi6wfAk07n8g0Zg7riXBLhljOwbfvAyGZU+RfuLden WNpCNsoj4EQMJUx054XcszNzKJpM4FO8R5jUv3l2MudvGlkj/k9ZFqy93Qn91FfPNx2L mw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2qtwktym9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:37 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1PHfaES001516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 25 Feb 2019 17:41:37 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1PHfaPI032683 for ; Mon, 25 Feb 2019 17:41:36 GMT Received: from localhost (/10.159.153.131) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Feb 2019 09:41:36 -0800 Subject: [PATCH 1/2] xfs: fix uninitialized error variables From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 25 Feb 2019 09:41:35 -0800 Message-ID: <155111649548.15126.8995811550165658297.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9178 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=923 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902250130 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong smatch complained about some uninitialized error returns, so fix those. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- fs/xfs/libxfs/xfs_sb.c | 2 +- fs/xfs/xfs_reflink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index 4e5029c37966..77a3a4085de3 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -877,7 +877,7 @@ xfs_initialize_perag_data( uint64_t bfreelst = 0; uint64_t btree = 0; uint64_t fdblocks; - int error; + int error = 0; for (index = 0; index < agcount; index++) { /* diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index d42e3ef9050e..680ae7662a78 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -261,7 +261,7 @@ xfs_reflink_convert_cow_locked( struct xfs_bmbt_irec got; struct xfs_btree_cur *dummy_cur = NULL; int dummy_logflags; - int error; + int error = 0; if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, &got)) return 0;