From patchwork Wed Apr 30 16:59:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Molton X-Patchwork-Id: 4095121 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B636FBFF02 for ; Wed, 30 Apr 2014 16:59:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00986202AE for ; Wed, 30 Apr 2014 16:59:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20AF2202BE for ; Wed, 30 Apr 2014 16:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964833AbaD3Q7c (ORCPT ); Wed, 30 Apr 2014 12:59:32 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:47920 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S964792AbaD3Q7c (ORCPT ); Wed, 30 Apr 2014 12:59:32 -0400 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 5834D467126; Wed, 30 Apr 2014 17:59:31 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PF5PsJCx2q2t; Wed, 30 Apr 2014 17:59:25 +0100 (BST) Received: from snark.dyn.ducie.codethink.co.uk (snark.dyn.ducie.codethink.co.uk [10.24.1.101]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPS id BFDDF466048; Wed, 30 Apr 2014 17:59:19 +0100 (BST) Received: from ian by snark.dyn.ducie.codethink.co.uk with local (Exim 4.82) (envelope-from ) id 1WfXql-0001p5-A3; Wed, 30 Apr 2014 17:59:15 +0100 From: Ian Molton To: linux-mmc@vger.kernel.org Cc: grant.likely@linaro.org, chris@printf.net, Ian Molton Subject: [PATCH 2/6] mmc: TMIO: Fixup error return path Date: Wed, 30 Apr 2014 17:59:07 +0100 Message-Id: <1398877151-6965-3-git-send-email-ian.molton@codethink.co.uk> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1398877151-6965-1-git-send-email-ian.molton@codethink.co.uk> References: <1398877151-6965-1-git-send-email-ian.molton@codethink.co.uk> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Trivial patch to correct the error return path. Reviewed-by: Violeta Menendez Signed-off-by: Ian Molton --- drivers/mmc/host/tmio_mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index bf6252c..17415f8 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -85,8 +85,10 @@ static int tmio_mmc_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; + if (!res) { + ret = -EINVAL; + goto cell_disable; + } /* SD control register space size is 0x200, 0x400 for bus_shift=1 */ pdata->bus_shift = resource_size(res) >> 10;