From patchwork Thu Apr 3 15:11:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 3932911 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E93E7BFF02 for ; Thu, 3 Apr 2014 15:12:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 761AE201F9 for ; Thu, 3 Apr 2014 15:12:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8717E20260 for ; Thu, 3 Apr 2014 15:12:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbaDCPM0 (ORCPT ); Thu, 3 Apr 2014 11:12:26 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:10241 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407AbaDCPMN (ORCPT ); Thu, 3 Apr 2014 11:12:13 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3G00H2TNKCPZB0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 04 Apr 2014 00:12:12 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id FC.97.10092.C4A7D335; Fri, 04 Apr 2014 00:12:12 +0900 (KST) X-AuditID: cbfee68f-b7f156d00000276c-df-533d7a4ca44a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C9.49.28157.C4A7D335; Fri, 04 Apr 2014 00:12:12 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N3G00IVZNJBV460@mmp2.samsung.com>; Fri, 04 Apr 2014 00:12:12 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: inki.dae@samsung.com, r.sh.open@gmail.com, joshi@samsung.com, Paul Taysom , Rahul Sharma Subject: [PATCH 3/7] drm/exynos: check for null pointers in error handling Date: Thu, 03 Apr 2014 20:41:00 +0530 Message-id: <1396537864-29291-4-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1396537864-29291-1-git-send-email-rahul.sharma@samsung.com> References: <1396537864-29291-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRsSkRtenyjbYYMNTQ4srX9+zWUy6P4HF 4vuuL+wWM87vY7JY+CLeYsqiw6wWC/pdHdg9ZjdcZPHYOesuu8f97uNMHn1bVjF6fN4kF8Aa xWWTkpqTWZZapG+XwJUxfdILtoJT7BWXv75kb2A8zNbFyMEhIWAicfg8YxcjJ5ApJnHh3nqg MBeHkMBSRomlTbuZIBImEiuOL2CHSExnlDjw/QczhNPOJHFo7h1WkCo2AV2J2QefgY0SEXCT aDo8kxWkiFmgj1Fi76+jYAlhAS+Je//WgY1lEVCVONc2nR3E5hXwkPjzeQPUSQoScybZgIQ5 BTwlvnz+BNYqBFTyc98hsCskBOaxS7xY9ZoFYo6AxLfJh1ggemUlNh1ghrhaUuLgihssExiF FzAyrGIUTS1ILihOSi8y1itOzC0uzUvXS87P3cQIDPHT/57172C8e8D6EGMy0LiJzFKiyfnA GMkriTc0NjOyMDUxNTYytzQjTVhJnPf+w6QgIYH0xJL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Hn1fCdXI1VoLnNK2vdVUYinOSDTUYi4qTgQAbzlAQeUC AAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Paul Taysom Smatch error from arm build: drivers/gpu/drm/exynos/ exynos_hdmi.c:2374 hdmi_probe() error: potential NULL dereference 'hdata->hdmiphy_port'. Added check for hdata->hdmiphy_port that it is not NULL. Signed-off-by: Paul Taysom Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index f6d4435..5ed8973 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2356,7 +2356,8 @@ static int hdmi_probe(struct platform_device *pdev) return 0; err_hdmiphy: - put_device(&hdata->hdmiphy_port->dev); + if (hdata->hdmiphy_port) + put_device(&hdata->hdmiphy_port->dev); err_ddc: put_device(&hdata->ddc_adpt->dev); return ret;