From patchwork Tue May 7 03:39:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 2530611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id BBE08DF215 for ; Tue, 7 May 2013 03:37:49 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZYiq-0006CX-Iv; Tue, 07 May 2013 03:37:48 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZYio-0001wa-4A; Tue, 07 May 2013 03:37:46 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZYil-0001wH-RM for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2013 03:37:44 +0000 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MME00H0ESQ898K0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2013 12:37:20 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 5B.18.04074.0F678815; Tue, 07 May 2013 12:37:20 +0900 (KST) X-AuditID: cbfee690-b7f136d000000fea-d6-518876f0e22a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 60.0F.01422.0F678815; Tue, 07 May 2013 12:37:20 +0900 (KST) Received: from padma-linuxpc.sisodomain.com ([107.108.83.35]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MME009ZSSPT5L00@mmp2.samsung.com>; Tue, 07 May 2013 12:37:20 +0900 (KST) From: Padmavathi Venna To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, padma.v@samsung.com, padma.kvr@gmail.com Subject: [PATCH] ASoC: Samsung: i2s: Fix crash in i2s driver Date: Tue, 07 May 2013 09:09:01 +0530 Message-id: <1367897941-18439-1-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsWyRsSkRvdDWUegwY8JYhYP5m1js/g3+xSb Re+Cq2wWmx5fY7WYcX4fk0X7sjmsFr9vfmezuLjiC5NFxzJGB06PnbPusntsXlLv8XLibzaP vi2rGD0+b5ILYI3isklJzcksSy3St0vgyri0cjtrwUW2itM/3zI3MO5n7WLk5JAQMJE4+uQO M4QtJnHh3nq2LkYuDiGBpYwSl5f9YoYp+rJ1ATtEYjpQ4ucKRginh0niyPSVLF2MHBxsAjoS LWddQBpEBMol7j98wApSwyzQyijxYP5SJpCEsICNxNq3U9hAbBYBVYntJ5+C9fIKOEts3JsN sUxB4tjUr2C9EgKT2SUaHjcyQ9QLSHybfAisXkJAVmLTAajjJCUOrrjBMoFRcAEjwypG0dSC 5ILipPQiE73ixNzi0rx0veT83E2MwDA+/e/ZhB2M9w5YH2JMBho3kVlKNDkfGAd5JfGGxmZG FqYmpsZG5pZmpAkrifOqt1gHCgmkJ5akZqemFqQWxReV5qQWH2Jk4uCUamCcx3H6VvbVads+ To6WnKR7c/nbthsT/7Ns+Bra8ctx8qUf+pk7N2fFCLwMnx50p29/uvzVoJJNK7+LXzZv2iiy MVbV1ahslY4HS83zMp8sfxabaQs6ft/L2H9krcA1kbjDdplT3L9zu9hazl0UfnND5u+DbhGz Lj6dfvWYsFPxUjHTiG6tVzEflFiKMxINtZiLihMB7Mt/uXkCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t9jQd0PZR2BBtfP8Vo8mLeNzeLf7FNs Fr0LrrJZbHp8jdVixvl9TBbty+awWvy++Z3N4uKKL0wWHcsYHTg9ds66y+6xeUm9x8uJv9k8 +rasYvT4vEkugDWqgdEmIzUxJbVIITUvOT8lMy/dVsk7ON453tTMwFDX0NLCXEkhLzE31VbJ xSdA1y0zB+geJYWyxJxSoFBAYnGxkr4dpgmhIW66FjCNEbq+IUFwPUYGaCBhDWPGpZXbWQsu slWc/vmWuYFxP2sXIyeHhICJxJetC9ghbDGJC/fWs3UxcnEICUxnlLj8cwUjhNPDJHFk+kqW LkYODjYBHYmWsy4gDSIC5RL3Hz5gBalhFmhllHgwfykTSEJYwEZi7dspbCA2i4CqxPaTT8F6 eQWcJTbuzYZYpiBxbOpX1gmM3AsYGVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBEfJM+kd jKsaLA4xCnAwKvHwKpxqDxRiTSwrrsw9xCjBwawkwiut3REoxJuSWFmVWpQfX1Sak1p8iDEZ aPlEZinR5HxgBOeVxBsam5ibGptamliYmFmSJqwkznuw1TpQSCA9sSQ1OzW1ILUIZgsTB6dU AyNX58e3jxZe/XfnwFTb9XuTnqk+MJof3aW4bl+IWYXfqclue9ZN3yLzeGFA9gF5lvb5rl+M 1qat3acRPs25xO9EZWTrytNvXzK8WJBdoCb7Jsr87oRNfzuymZfqc12yPqr7bK7dn3Uf7U/+ Yv5yJOZm1Mka68s7NzYYyZ6+X/DUsWdD666PsQJuSizFGYmGWsxFxYkAuJ6siNYCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130506_233744_126413_DE50AF56 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.1 (--------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-8.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_HDRS_LCASE Odd capitalization of message header Cc: sbkim73@samsung.com, kgene.kim@samsung.com, broonie@opensource.wolfsonmicro.com, thomas.ab@samsung.com, alim.akhtar@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 This patch fixes a null pointer deference in i2s driver in DT case Signed-off-by: Padmavathi Venna --- This patch is dependent on below patch posted by Thomas Abraham. https://patchwork.kernel.org/patch/2224801/ sound/soc/samsung/i2s.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 7ce7c50..eaf6439 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1182,7 +1182,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) pri_dai->sec_dai = sec_dai; } - if (i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { + if (i2s_pdata && i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { dev_err(&pdev->dev, "Unable to configure gpio\n"); ret = -EINVAL; goto err;