From patchwork Thu Jan 19 13:48:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9525847 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 EC7B4601AE for ; Thu, 19 Jan 2017 13:50:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE16928111 for ; Thu, 19 Jan 2017 13:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2FBD28517; Thu, 19 Jan 2017 13:50:23 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 8F26228111 for ; Thu, 19 Jan 2017 13:50:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752822AbdASNuT (ORCPT ); Thu, 19 Jan 2017 08:50:19 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:38073 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752806AbdASNtt (ORCPT ); Thu, 19 Jan 2017 08:49:49 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OK100E2251VAQ80@mailout3.w1.samsung.com>; Thu, 19 Jan 2017 13:49:08 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170119134907eucas1p1959e01cbfd5c0a6008d77b733d41e98f~bMG1D7Yr70668006680eucas1p1j; Thu, 19 Jan 2017 13:49:07 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 4D.B9.09557.3D3C0885; Thu, 19 Jan 2017 13:49:07 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170119134907eucas1p126b668fe7e8054da6c4233d3ab345ba5~bMG0ab8JC2080120801eucas1p1h; Thu, 19 Jan 2017 13:49:07 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-da-5880c3d3f727 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 13.20.10233.EC3C0885; Thu, 19 Jan 2017 13:49:02 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OK100BYG51LGB30@eusync1.samsung.com>; Thu, 19 Jan 2017 13:49:06 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Bartlomiej Zolnierkiewicz Subject: [PATCH v3 06/13] pinctrl: samsung: Fix samsung_pinctrl_create_functions return value Date: Thu, 19 Jan 2017 14:48:46 +0100 Message-id: <1484833733-16082-7-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1484833733-16082-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDIsWRmVeSWpSXmKPExsWy7djPc7qXDzdEGCxZrWuxccZ6Vovz5zew W0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CuQZGaABB+cA92AlfbsEt4ypJ7azF9xjq1i7cD1zA+Nj1i5GTg4JAROJ DbOnskDYYhIX7q1n62Lk4hASWMIo0X6lkQnCaWKSON++A6yKTcBQouttF1iViEAzo0TDkl4w h1lgApPEzE8NTCBVwgLxEq+e3gDrYBFQlfj+bBYjiM0r4CHxYMdNJoh9chInj00Gu4NTwFNi 6pwmNhBbCKhmydKLrBMYeRcwMqxiFEktLc5Nzy020itOzC0uzUvXS87P3cQIDPttx35u2cHY 9S74EKMAB6MSD29HUX2EEGtiWXFl7iFGCQ5mJRFem70NEUK8KYmVValF+fFFpTmpxYcYTYGO msgsJZqcD4zJvJJ4QxNDc0tDI2MLC3MjIyVx3qkfroQLCaQnlqRmp6YWpBbB9DFxcEo1MK7l fxJmIHpMc7rYpcZ43b0nDh99ULHpLPf/D0dDlrn9+zj94G/vfQuOLo11O+AbbBL97+b7gqXn l0ueC7TZsd9pn1xO27sH16Plu1w9TpvP1j+q/Nd9g8s9ZS6Zlzvjd0zoW/Bs0tYdax2Tc4U9 7ERL8wLvGBhPPqs+jXnJiuo86UgXVpsvk/mVWIozEg21mIuKEwF86LKUkQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170119134907eucas1p126b668fe7e8054da6c4233d3ab345ba5 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: 20170119134907eucas1p126b668fe7e8054da6c4233d3ab345ba5 X-RootMTR: 20170119134907eucas1p126b668fe7e8054da6c4233d3ab345ba5 References: <1484833733-16082-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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 Acked-by: Tomasz Figa --- 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; /*