From patchwork Mon Jul 28 08:15:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seung-Woo Kim X-Patchwork-Id: 4632681 Return-Path: X-Original-To: patchwork-dri-devel@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 CDE699F36A for ; Mon, 28 Jul 2014 08:15:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 172AD2012F for ; Mon, 28 Jul 2014 08:15:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B5E412012B for ; Mon, 28 Jul 2014 08:15:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 454436E064; Mon, 28 Jul 2014 01:15:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CD8E6E064 for ; Mon, 28 Jul 2014 01:15:14 -0700 (PDT) Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9E00E7TXLCFV70@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 28 Jul 2014 17:15:12 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id DC.30.25328.E8606D35; Mon, 28 Jul 2014 17:15:10 +0900 (KST) X-AuditID: cbfee68d-b7f2f6d0000062f0-62-53d6068e3baf Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 64.60.05196.E8606D35; Mon, 28 Jul 2014 17:15:10 +0900 (KST) Received: from localhost.localdomain ([10.252.83.121]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9E006CTXL91UP0@mmp1.samsung.com>; Mon, 28 Jul 2014 17:15:10 +0900 (KST) From: Seung-Woo Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH] drm/exynos: hdmi: add null check for hdmiphy_port Date: Mon, 28 Jul 2014 17:15:22 +0900 Message-id: <1406535322-6589-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsWyRsSkULeP7Vqwwd2NRha9504yWVz5+p7N YtL9CSwWL+5dZLGYcX4fk8WMyS/ZHNg8tn97wOpxv/s4k0ffllWMHp83yQWwRHHZpKTmZJal FunbJXBlvPm5la3gPFvFgYaJzA2Mt1m7GDk5JARMJNas7WKBsMUkLtxbz9bFyMUhJLCUUWLC nmNwRVcvdLFCJBYxSkzueMcM4bQxSZza+Aasik1AR2L/kt9gtoiApcSDrb+Bijg4mAWyJLYf UQUJCws4Sew62c0IEmYRUJWY/jkUJMwr4Cox/XwnO8QuBYkF996CHSEh8J5N4tqEpWAJFgEB iW+TD7GA9EoIyEpsOsAMUS8pcXDFDZYJjIILGBlWMYqmFiQXFCelFxnqFSfmFpfmpesl5+du YgQG6Ol/z3p3MN4+YH2IMRlo3ERmKdHkfGCA55XEGxqbGVmYmpgaG5lbmpEmrCTOm/QwKUhI ID2xJDU7NbUgtSi+qDQntfgQIxMHp1QDo3Hg4ZtpfLtTqvhWLb+WrrL6NGOCGfc5qSSOP8tP XnkeZ+gYvMvsweStd8Q/vHp7uV94+kFT1qPfUicZT5mQE6l2O+tWgDNTlymH1xPVqBU/ffuO 9+X2Wbmc+WK78+jSg5s3C7BIHevabzp93lzTuNeMszQXvhZ5Kb9H/LPBoybtK42GvtoHGZVY ijMSDbWYi4oTAdAa6qNmAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42I5/e+xgG4f27Vgg5krtS16z51ksrjy9T2b xaT7E1gsXty7yGIx4/w+JosZk1+yObB5bP/2gNXjfvdxJo++LasYPT5vkgtgiWpgtMlITUxJ LVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wB2q6kUJaYUwoUCkgs LlbSt8M0ITTETdcCpjFC1zckCK7HyAANJKxhzHjzcytbwXm2igMNE5kbGG+zdjFyckgImEhc vdAFZYtJXLi3nq2LkYtDSGARo8TkjnfMEE4bk8SpjW/AqtgEdCT2L/kNZosIWEo82PobqIiD g1kgS2L7EVWQsLCAk8Suk92MIGEWAVWJ6Z9DQcK8Aq4S0893skPsUpBYcO8t2wRG7gWMDKsY RVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgsP/mfQOxlUNFocYBTgYlXh4LYKvBguxJpYVV+Ye YpTgYFYS4W3/BxTiTUmsrEotyo8vKs1JLT7EaAq0fCKzlGhyPjA280riDY1NzIwsjcwNLYyM zZXEeQ+2WgcKCaQnlqRmp6YWpBbB9DFxcEo1MG50mvZ/w/Mbe7SOrBTdZxSWO1nmv0vVxoDa yxM+bhV4deiW3+EVvFzdVZf+HexpqPi3XuXodDHpoh5Tlua1z3oCPc9YLa0WqTnBFHOKbatz 1uofene907/Mnyl+MlhKdbec3PZ1k785Svzg5JR5VvB1rkDJE6FNBgtCWh8fKZvsaNgfpG+q dUiJpTgj0VCLuag4EQBHHWfwlQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: linux-samsung-soc@vger.kernel.org, sw0312.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 The hdmiphy can be apb and hdmiphy_port can be null. So before accessing hdmiphy_port, it should be checked. Signed-off-by: Seung-Woo Kim --- drivers/gpu/drm/exynos/exynos_hdmi.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index fd8141f..54d97f7 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2520,7 +2520,8 @@ static int hdmi_remove(struct platform_device *pdev) if (hdata->res.reg_hdmi_en) regulator_disable(hdata->res.reg_hdmi_en); - put_device(&hdata->hdmiphy_port->dev); + if (hdata->hdmiphy_port) + put_device(&hdata->hdmiphy_port->dev); put_device(&hdata->ddc_adpt->dev); pm_runtime_disable(&pdev->dev);