From patchwork Wed Jul 27 03:11:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salah Triki X-Patchwork-Id: 9249211 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 94E8660868 for ; Wed, 27 Jul 2016 03:12:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8827A276AE for ; Wed, 27 Jul 2016 03:12:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C98027BFA; Wed, 27 Jul 2016 03:12:59 +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_ADSP_CUSTOM_MED, 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 1BB0E27BE5 for ; Wed, 27 Jul 2016 03:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757196AbcG0DMn (ORCPT ); Tue, 26 Jul 2016 23:12:43 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32813 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751657AbcG0DMY (ORCPT ); Tue, 26 Jul 2016 23:12:24 -0400 Received: by mail-wm0-f66.google.com with SMTP id o80so4437322wme.0; Tue, 26 Jul 2016 20:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FOJZzblW2RHXCYzE+pdhwDoImyCrWBf5zbZHoGhWy+I=; b=lkbo1NMYuoYP/TiDr5XVhDb1EddOz3DdADMu9x1mIYDZD3UKNr7ns5VEoI7Mqdq8zj ogAvxROUmsJ4HS9Ic48eOWFllH5AVLpfoTAREpP18gSIS+Cg28ESc2t3APo9ldskqA1f INiJFkf5KtlloWzk3fbzo9DWzxej+nkawismm46y4vaSG5QTaw4R6tfehGZp+1dpr3eh Kc+6eYpekxC6YaCSdP87pjpR4Nlhw7k1HKDhQsDmgixwFBEfqXp6GvhIHnoxxX6x5Zkx jRaZIzMa0t6i9Ug1GWZBgk1roogY9bv/WYSYOqbEvACHntYxQUk8n0CR9wKKJ0qrjjoD jH8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FOJZzblW2RHXCYzE+pdhwDoImyCrWBf5zbZHoGhWy+I=; b=ITD0qg1YuJH5RZo1EryBVCatDVGgl0r1FkoeK2fai4KsgmwFkLPRx2s10ncH1Lef/V rHT5LVY2X7j1IpeF5ybPVjOjTOPrZhbQb0+Bf0k/Ebsh7axK9YohrwxSSqvrp96LZg00 5OaV2afYgIy2coi4tvp2ZBifjodPIqxRfFCZuhGcv9Okh6bMqTmEbRDG2bdwaAsw+c6H 7azGmVZi9Qy3Waf1AM8qmt0UXBBm0mL82RTL083pVWY9w02EjpwKjBEhP4l4y3rb/FIB hxhEioFbkACmH8MzE30ihCubW5N5GPM9qF/OMC6Bt18KdQzmWmcuWQbofRwRMr52m5RZ SsNg== X-Gm-Message-State: AEkooutnI8Pm2u+3F9bzGcXY4W7IySAzxnvmhQkN6yNFt/dwWuDcNGAlRJJI9BwXsHXpdw== X-Received: by 10.194.171.131 with SMTP id au3mr24772506wjc.125.1469589142822; Tue, 26 Jul 2016 20:12:22 -0700 (PDT) Received: from localhost.localdomain ([41.224.169.131]) by smtp.gmail.com with ESMTPSA id e65sm4696967wmg.3.2016.07.26.20.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jul 2016 20:12:21 -0700 (PDT) From: Salah Triki To: akpm@linux-foundation.org, viro@ZenIV.linux.org.uk Cc: luisbg@osg.samsung.com, mhocko@suse.com, vdavydov@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, salah.triki@gmail.com Subject: [RESEND PATCH 4/4] fs: befs: Remove goto from befs_bread_iaddr Date: Wed, 27 Jul 2016 04:11:55 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: <9859a616787673d2f36ce21d4aa0220637c55001.1469588473.git.salah.triki@gmail.com> References: <9859a616787673d2f36ce21d4aa0220637c55001.1469588473.git.salah.triki@gmail.com> In-Reply-To: <9859a616787673d2f36ce21d4aa0220637c55001.1469588473.git.salah.triki@gmail.com> References: <9859a616787673d2f36ce21d4aa0220637c55001.1469588473.git.salah.triki@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since goto statement merely returns NULL, replace it with return statement. Signed-off-by: Salah Triki --- fs/befs/io.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 4223b77..af631a6 100644 --- a/fs/befs/io.c +++ b/fs/befs/io.c @@ -37,7 +37,7 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr) if (iaddr.allocation_group > befs_sb->num_ags) { befs_error(sb, "BEFS: Invalid allocation group %u, max is %u", iaddr.allocation_group, befs_sb->num_ags); - goto error; + return NULL; } block = iaddr2blockno(sb, &iaddr); @@ -49,13 +49,9 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr) if (bh == NULL) { befs_error(sb, "Failed to read block %lu", (unsigned long)block); - goto error; + return NULL; } befs_debug(sb, "<--- %s", __func__); return bh; - - error: - befs_debug(sb, "<--- %s ERROR", __func__); - return NULL; }