From patchwork Fri Dec 20 01:48:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3392361 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 1EC0C9F344 for ; Fri, 20 Dec 2013 23:31:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2807D20155 for ; Fri, 20 Dec 2013 23:31:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6F3D02014A for ; Fri, 20 Dec 2013 23:30:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF281FA502 for ; Fri, 20 Dec 2013 15:30:56 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 3694311DB35 for ; Thu, 19 Dec 2013 17:48:10 -0800 (PST) Received: by mail-bk0-f52.google.com with SMTP id u14so972179bkz.25 for ; Thu, 19 Dec 2013 17:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=xduhXATkBwMdDSkU3ks23/bvwDR0DUFT/JtEFW0YIdA=; b=g9c7o5rLg00Vunugw1q3w2MK1jYRko9DzEBiyOANXuN4ecFHaRdL6eIOONAtrRqUZ8 TdmUH+phy+jIQXa7pumEY/eCBw5Z5jhKJA2vhqrzWMjaGsxLeSOt0Rr65PJAMniGqgac p9Ydp9Aau8/4N5KqY9dM62H8KvL1eo1DjsvNRvyabYAMPpRyeg7ZQEM9pzgyF+p85j6P dLO/njZaytGYte6MHvCG7B1/nMl8LAQl0x14aLAChA3eWahuNZb5RqPvRecIG65rp7Bk Jac21giYse2XryeQ/OS7QCnwPi1S/dpjdJ9Uv7QAKpIk+cN2OTu+hG1uCMljuTkNE70P c9NQ== MIME-Version: 1.0 X-Received: by 10.204.164.15 with SMTP id c15mr3138641bky.22.1387504087794; Thu, 19 Dec 2013 17:48:07 -0800 (PST) Received: by 10.204.74.130 with HTTP; Thu, 19 Dec 2013 17:48:07 -0800 (PST) Date: Fri, 20 Dec 2013 09:48:07 +0800 Message-ID: Subject: [PATCH -next] drm/panel: missing platform_driver_unregister() on error in panel_simple_init() From: Wei Yongjun To: airlied@linux.ie, grant.likely@linaro.org, robh+dt@kernel.org, treding@nvidia.com X-Mailman-Approved-At: Fri, 20 Dec 2013 15:30:20 -0800 Cc: yongjun_wei@trendmicro.com.cn, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Wei Yongjun Add the missing platform_driver_unregister() before return from panel_simple_init() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/panel/panel-simple.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3e611af..d801162 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -476,10 +476,14 @@ static int __init panel_simple_init(void) if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) { err = mipi_dsi_driver_register(&panel_simple_dsi_driver); if (err < 0) - return err; + goto err_dsi_driver_register; } return 0; + +err_dsi_driver_register: + platform_driver_unregister(&panel_simple_platform_driver); + return err; } module_init(panel_simple_init);