From patchwork Tue Jan 17 12:44:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9520757 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 786CC6020A for ; Tue, 17 Jan 2017 12:47:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 634EC28545 for ; Tue, 17 Jan 2017 12:47:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 581F128548; Tue, 17 Jan 2017 12:47:19 +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, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 208B028547 for ; Tue, 17 Jan 2017 12:47:19 +0000 (UTC) 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 1cTTAQ-0003I4-Uk; Tue, 17 Jan 2017 12:47:14 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTT8f-00080U-NI for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2017 12:45:27 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJX007W0CR1GA60@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2017 12:45:01 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170117124500eucas1p10fd52f7da1f2722379eaef7513bbe360~aj8RXXrFa2603126031eucas1p1r; Tue, 17 Jan 2017 12:45:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id CD.B6.30614.CC11E785; Tue, 17 Jan 2017 12:45:00 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170117124459eucas1p1ead13705d84054c1d69b5d7a9795f0e9~aj8Qtr2nL2981029810eucas1p1V; Tue, 17 Jan 2017 12:44:59 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-2b-587e11cce9c3 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A5.E4.10233.6C11E785; Tue, 17 Jan 2017 12:44:54 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJX00GNRCQPHB20@eusync2.samsung.com>; Tue, 17 Jan 2017 12:44:59 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 06/13] pinctrl: samsung: Fix samsung_pinctrl_create_functions return value Date: Tue, 17 Jan 2017 13:44:37 +0100 Message-id: <1484657084-26227-7-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1484657084-26227-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsWy7dj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TEltUghNS85PyUzL91WKTTETddCSSEvMTfV VilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJbhmrZuxnLPjNWvG17SdzA2MXaxcjJ4eEgInE s7Z3ULaYxIV769lAbCGBJYwSO7eldjFyAdlNTBJNM/cwgyTYBAwlut52sYEkRASaGSUalvSC OcwCE5gkZn5qYOpi5OAQFoiXWL2YH6SBRUBV4svjX2AbeAU8JH7ve84GsU1O4uSxyWBxTgFP iR8/1zNBbPaQOH9/H+sERt4FjAyrGEVSS4tz03OLjfSKE3OLS/PS9ZLzczcxAkN+27GfW3Yw dr0LPsQowMGoxMPrdLsmQog1say4MvcQowQHs5II71yBuggh3pTEyqrUovz4otKc1OJDjKZA R01klhJNzgfGY15JvKGJobmloZGxhYW5kZGSOO/UD1fChQTSE0tSs1NTC1KLYPqYODilGhgP 1uj9FQ+bkvC8IWl9P0ta6Yuvxk2nBHnrIg1V26bOf/1SJ12/51HdGZmUaYstU+/seWcr9t9U p9+qq+j59xmTdgfzHVjTpPEn+E77G6k49ZuskeeD1skXLD7IoDj3zoO6HL57Uue4hGIvsxt7 uFxgdDt7c01K0o0oC16H9WcEJmZ0iz55tEWJpTgj0VCLuag4EQAyI4FwjwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170117124459eucas1p1ead13705d84054c1d69b5d7a9795f0e9 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170117124459eucas1p1ead13705d84054c1d69b5d7a9795f0e9 X-RootMTR: 20170117124459eucas1p1ead13705d84054c1d69b5d7a9795f0e9 References: <1484657084-26227-1-git-send-email-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170117_044526_067279_82966542 X-CRM114-Status: GOOD ( 11.98 ) 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: Bartlomiej Zolnierkiewicz , Linus Walleij , Tomasz Figa , Krzysztof Kozlowski , Sylwester Nawrocki , Marek Szyprowski MIME-Version: 1.0 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 Return proper error code in case of memory allocation failure. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- drivers/pinctrl/samsung/pinctrl-samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index b11e67e85460..10b3fd826231 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -751,7 +751,7 @@ static struct samsung_pmx_func *samsung_pinctrl_create_functions( functions = devm_kzalloc(dev, func_cnt * sizeof(*functions), GFP_KERNEL); if (!functions) - return ERR_PTR(-EINVAL); + return ERR_PTR(-ENOMEM); func = functions; /*