Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5452003pxu; Tue, 22 Dec 2020 18:25:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2FymsIKvZVSJ94tAoomzTrIgxVIC2Fkg72f/rB7gYM2wmegiFkTQY9exmQJNd5jsQZ4Zt X-Received: by 2002:a17:906:3ac8:: with SMTP id z8mr9005341ejd.273.1608690330205; Tue, 22 Dec 2020 18:25:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608690330; cv=none; d=google.com; s=arc-20160816; b=pO6Zs03tGOYgNKy7hGeHP1179EzLZuxzt1Gc5PU1v9KsFFTi9I81I/NDb0c85/O88X HHcsAsdBoTmVNPtbhMOWfTkQiS7N+DnmC036v6YrVOBrH1zEE7/ghlSpg2oQ02hqWj8h GiwmtLtA0awRGMfhMrS90GRJI9+z1tPxRfhV7R402gMCGfInSlE7M47mDPOBHOpshcOD HhBggr9WokQdtNaXl5TYiizAZdXuEP7xZ97F+5qF3Z5RM/s44dnknHmLjTydh9xaNsGR CD+OTD5eS6Iql2nDmna/uQpFEFCxAfsKMlwKKoYK6EpFAxoQCvYiGn5g20x2v5R8fjgZ Fv6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HRrQuXhoVcYcwZziBt8FgH2ph+Pv1vqC6EfRzN0Q4zU=; b=mntVm6v49HLfiyeANbebS4y7gwuf33aL5iDsXVH0QmJbIK3p99uHNfi+5KuMA+h4E0 3HM0iuKEUMDBXbsgw1s7rpKhvakn+grvEaGnOB7vp3YTLHT8ZNSFF2pAke2sFjCnpPnA dc03i9lv21bldxJNRPvt4NiXZviRV01jOyyPKqyS4eorZa9JSAqMFGJ3y2VFD+IhZA86 vRIFpnfOnpCsL+2NgO9SkaDjKNcNhVlswYDMZQdQyBzOIwNttTZJjNgkM95SAfrgFE1e 12Tkdrp0VjPbZ1JjGQ9sbNt5JnFiqsSOvU5nVmaZZPB9GJrGKrupu6hR4KZpW4fjr3Gd UBLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sgJORgoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w29si13143675edl.176.2020.12.22.18.25.08; Tue, 22 Dec 2020 18:25:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sgJORgoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730060AbgLWCXl (ORCPT + 99 others); Tue, 22 Dec 2020 21:23:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:49658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729999AbgLWCX2 (ORCPT ); Tue, 22 Dec 2020 21:23:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89D8B23381; Wed, 23 Dec 2020 02:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690189; bh=d+jnG9khOxDlTsbt+UFQssINvJMTzV+aT2ypQH3ZMMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sgJORgoiL3j0yBi7h/HGTHghhdVEKcDzFCbZ5UGz4oeDnO78hPxqBNnQaQxhHi5LO UUjRgZXptZYQxzcsZwTNa5CC4tW9/DYiGo/DTq/dfKuVGA5i4kdhkNnrnCx6eJDw6r GV0QHq+xDO51S+HkXH7RlPZqtJNUCaIxjirCg4HY6cbCHjh6H8OCV1F63jeX8/23us WmjgnSOtQLTuYlEXPtix1/icii2i57lsv9gKjNCFLrL4KJdLr8eOC8eGRSHp9ZXqR4 fffgT+OFeWWf3MAatErcJozC9Kr/JEXEAA6pZQBsIAeu1F1SunDtYGbRaGvs3NVLMi nq8PRDf9Tn7mg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qinglang Miao , Sam Ravnborg , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.14 13/66] drm: panel: simple: add missing platform_driver_unregister() in panel_simple_init Date: Tue, 22 Dec 2020 21:21:59 -0500 Message-Id: <20201223022253.2793452-13-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit f2e66f212a9de04afc2caa5ec79057c0ac75c728 ] Add the missing platform_driver_unregister() before return from panel_simple_init in the error handling case when failed to register panel_simple_dsi_driver with CONFIG_DRM_MIPI_DSI enabled. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201031011856.137307-1-miaoqinglang@huawei.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 6df312ba1826b..37b018a81ee0e 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -2417,8 +2417,10 @@ 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) + if (err < 0) { + platform_driver_unregister(&panel_simple_platform_driver); return err; + } } return 0; -- 2.27.0