From patchwork Fri Sep 26 06:44:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 4978821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F0199F3DF for ; Fri, 26 Sep 2014 06:47:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCCCC202AE for ; Fri, 26 Sep 2014 06:47:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2418202A1 for ; Fri, 26 Sep 2014 06:47:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXPHM-000182-OI; Fri, 26 Sep 2014 06:45:20 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXPHK-0008Rb-7r for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 06:45:19 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCH00AX0XJF1L60@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 07:47:39 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-56-54250b62dd81 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 38.71.25543.26B05245; Fri, 26 Sep 2014 07:44:50 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NCH007W2XENYY40@eusync2.samsung.com>; Fri, 26 Sep 2014 07:44:50 +0100 (BST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] drivers: of: add return value to of_reserved_mem_device_init (fixup) Date: Fri, 26 Sep 2014 08:44:25 +0200 Message-id: <1411713865-26192-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1410434561-9294-2-git-send-email-m.szyprowski@samsung.com> References: <1410434561-9294-2-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsVy+t/xK7pJ3KohBrO2G1jMWb+GzeLvpGPs Fgf+7GC0WNndzGaxc907RouzTW/YLbZ3zmC3+HLlIZPFpsfXWC0u75rDZrH2yF12iwXHW1gd eDx+/5rE6HG5r5fJo+vtFSaPO9f2sHmcmPGbxWPzknqP2/8eM3us+/OKyaNvyypGj8+b5AK4 orhsUlJzMstSi/TtErgytq1YwlpwmK3icet1xgbGzaxdjJwcEgImEgffb2WHsMUkLtxbz9bF yMUhJLCUUeLQ+43MEE4fk8TC86+ZQarYBAwlut52sYHYIgJuEv/WHQLrYBaYzCxxbeEeJpCE sECcxJQznWANLAKqEqtefmEBsXkFPCQ+vuxghFgnJ/H/5Qqwek6gePuPZrAaIQF3iQtLfrJO YORdwMiwilE0tTS5oDgpPddQrzgxt7g0L10vOT93EyMkdL/sYFx8zOoQowAHoxIP7411KiFC rIllxZW5hxglOJiVRHg3cqiGCPGmJFZWpRblxxeV5qQWH2Jk4uCUamAU3vwz7dCpN3JXlP6s eS93dkthZ8vEtw4Rqo03OrhmWs/y2/rfSu9sWaOUnIzpHv/itob756eGes3931m14+yzc/vl pplLSOYc7nHWD215vODAJeerbN+ebWT9wTpz3bqJnp99VSI3bVt/LPLfx4trPW9xOp4IUzy7 xOD1xAyhWVPYXjcc+Ln6lxJLcUaioRZzUXEiAIhyIeE7AgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140925_234518_425425_BCAB0467 X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.8 (-----) Cc: Laura Abbott , Arnd Bergmann , Josh Cartwright , Michal Nazarewicz , linaro-mm-sig@lists.linaro.org, Kyungmin Park , Grant Likely , Andrew Morton , Joonsoo Kim , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This patch adds missing return value to error paths. Signed-off-by: Marek Szyprowski --- drivers/of/of_reserved_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 7e7de03..e975156 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -250,13 +250,13 @@ int of_reserved_mem_device_init(struct device *dev) np = of_parse_phandle(dev->of_node, "memory-region", 0); if (!np) - return; + return -ENODEV; rmem = __find_rmem(np); of_node_put(np); if (!rmem || !rmem->ops || !rmem->ops->device_init) - return; + return -ENIVAL; rmem->ops->device_init(rmem, dev); dev_info(dev, "assigned reserved memory node %s\n", rmem->name);