From patchwork Tue Nov 14 06:06:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10057041 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 4D4A660231 for ; Tue, 14 Nov 2017 06:08:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CE2528F98 for ; Tue, 14 Nov 2017 06:08:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E73E28F9B; Tue, 14 Nov 2017 06:08:49 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A4BCF28F98 for ; Tue, 14 Nov 2017 06:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9AzTlbr7bbTO5wlnrE4XaFk9Tg96Dn1a8v8LnRXjfYI=; b=pO3EgLkVgTYFf6 q8ZBuDDhgDd/ES2305PuXpjyfjOuLSveXNXgNpm8ObBieYeVwhqpgcJdz4zyDveSCwOK+d+EsUjfj QlxxJnHUziLDM0a+Zp+qJJGJRV2yKAXiR5kk4DgjGt1hIh/Usl+tR/rjRfemrUT+I8kYrzNNZkK7e /77NB+HfQr5WCuhjC4frzKIe2Z/XF2u2vYlsKSlTHBHBwCiffoS1/lnU2ZOcuak+htlD0mmU4AVfS apicfGAnhQ8usu0W7RJgnnH69Kv5Fg937fn6Fj9XW6NFhYMvyco5D4D56CtjxuD9AJcEDv/F662BU 0pdyKLc4DDbKbKOexOcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEUOh-0000xL-Sb; Tue, 14 Nov 2017 06:08:35 +0000 Received: from userp1040.oracle.com ([156.151.31.81]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEUOe-0000wQ-Vu for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2017 06:08:34 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vAE673Qr021885 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Nov 2017 06:07:04 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vAE672Nu017622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Nov 2017 06:07:02 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vAE670UW007365; Tue, 14 Nov 2017 06:07:01 GMT Received: from mwanda (/197.157.34.190) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 13 Nov 2017 22:07:00 -0800 Date: Tue, 14 Nov 2017 09:06:48 +0300 From: Dan Carpenter To: Tony Lindgren Subject: [PATCH] ARM: OMAP2+: Missing error code in omap_device_build() Message-ID: <20171114060648.frwveus2pjpx5idw@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170609 (1.8.3) X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171113_220833_110646_51363152 X-CRM114-Status: UNSURE ( 6.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, kernel-janitors@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We need to set the error code if omap_device_alloc() fails. Signed-off-by: Dan Carpenter diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 184acd95c216..f0388058b7da 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -514,8 +514,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name, goto odbs_exit1; od = omap_device_alloc(pdev, &oh, 1); - if (IS_ERR(od)) + if (IS_ERR(od)) { + ret = PTR_ERR(od); goto odbs_exit1; + } ret = platform_device_add_data(pdev, pdata, pdata_len); if (ret)