Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1710258pxt; Sat, 7 Aug 2021 22:12:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzfJlFQNZ3az7o6SfYTeltH1zRbXFnk1FFzLYj+gbxwRhdu5C7bMXsEL8VinKzXgyi3Y5o X-Received: by 2002:a5d:9599:: with SMTP id a25mr87930ioo.86.1628399542996; Sat, 07 Aug 2021 22:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628399542; cv=none; d=google.com; s=arc-20160816; b=fi1pmC4BdhQaUhNLeX0aAatQIZy6atvFglYCuq0AJY3cfXjD9xTPbNkYdePfI/hlFi aLihcdQpeHjAGze9otJu1+Gk+/VZ/UxZyWOGkB91JP5Sc5cogsf7sV7aJ3KJMaNSfVm5 7TfDnWEIBQpYD/M2VeJEQusBeCrxt5KbKDzzjiAPMQoBAvzW32f/JjAVISV2Vwj/fAIM dXqUyyoOD5ZlXx2EF97CydE6k1J6SwfsDnm3UA5NcBW0TpVz3SWIRGBFiBYoBk8JSOcR tzrwndOBVJL1JrzQqlea5vq3v5h7OzEIzgBHjfPnZt4iuDg4N4Pji2iB4oq9WPO2evIk jaiw== 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=V51zDB/SEkNZuZ7ecnZ90otRco0Fi/AE0VB1B0UCNvQ=; b=I9FBoBkh9yIbZeijMxtNwtwnfvLCW6SzJJRKYyD/8TgUl+UKXdgLkiul92HzhU/3Zs q5FxhdUo2G1O2KQ+A4kKaKj33JJ/1VXDajUj7nlaC9HJ65PXuhjmyVm3Sq+wLoKJ0JrC GPPk0tIxu7iSVLYO6Ybcrx025I+QJ+VGPeu24hAxmdhuEMEJ/1EATG8gFOHHUY0TKh0n eKFFRjC5jxRiVfvE70e/dvdurJ8OntaQjwmEI5lf3Y1sUwA0G47CgZo5IcwYJ3WfWt57 gGx+c94oUtT6tgsyAmX3/sq1Gq5JX1pxbhBuRl0j2boM34a1BHLtWcUXQ71RjOOrUxgn 2ZfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=FpZ8wN4r; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si11968339iln.130.2021.08.07.22.12.12; Sat, 07 Aug 2021 22:12:22 -0700 (PDT) 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=@goldelico.com header.s=strato-dkim-0002 header.b=FpZ8wN4r; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbhHHFL1 (ORCPT + 99 others); Sun, 8 Aug 2021 01:11:27 -0400 Received: from mo4-p03-ob.smtp.rzone.de ([85.215.255.104]:31144 "EHLO mo4-p03-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbhHHFLY (ORCPT ); Sun, 8 Aug 2021 01:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1628399445; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=V51zDB/SEkNZuZ7ecnZ90otRco0Fi/AE0VB1B0UCNvQ=; b=FpZ8wN4rWt04qJ7xuU9LZ1ljHPkCSqkgGizgunzRRIWR3viQU5Lk12pmK0huKbB4uP Ml2kMSUZYtldXPM1Zsh6l6I+222kj1hcaWPr7dQhy/DwcYZxYvuyH2yQpOMPmItaleBt czgecl7SFS7w7h1ROvooGaeHA/Ejm8ELCePjzPCQ0iynUszBAjScNZw4i+Vv03kHwwOH aS8HY5rFy3ev3xdib0UKmGb+zmpsaXu4KPfuRw42w58cPhn8FRotwKuSDtPwutipX4lx om0yahRD8fQDBw5g5XefWyiJ2tr6YPW29YFk96x0qFDiB6msHX39ouTGzAVI4jqE+kZq 6Kfg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o12DNOsPj0lByOdcKVX0" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.31.0 DYNA|AUTH) with ESMTPSA id Q02727x785AiEyc (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 8 Aug 2021 07:10:44 +0200 (CEST) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Ezequiel Garcia , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Paul Boddie , Jonas Karlman , dri-devel@lists.freedesktop.org Subject: [PATCH v3 1/9] drm/ingenic: fix drm_init error path if IPU was registered Date: Sun, 8 Aug 2021 07:10:35 +0200 Message-Id: <8e873f17fcc9aeb326d99b7c2c8cd25b61dca6f5.1628399442.git.hns@goldelico.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Boddie Code structure is in preparation to add hdmi unregistration in error case following the same pattern. Signed-off-by: Paul Boddie Signed-off-by: H. Nikolaus Schaller --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 5244f47634777..d9a793c314c1e 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1355,7 +1355,16 @@ static int ingenic_drm_init(void) return err; } - return platform_driver_register(&ingenic_drm_driver); + err = platform_driver_register(&ingenic_drm_driver); + if (err) + goto err_ipu_unreg; + + return 0; + +err_ipu_unreg: + if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU)) + platform_driver_unregister(ingenic_ipu_driver_ptr); + return err; } module_init(ingenic_drm_init); -- 2.31.1