From patchwork Wed Feb 19 10:21:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11390977 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7067930 for ; Wed, 19 Feb 2020 10:22:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B0462464E for ; Wed, 19 Feb 2020 10:22:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rajx1uCs"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="PJzH6ke5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B0462464E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G8x1dj1/nuzFffkZzvVgSu+adO8XyhnKYJBNNGlUWA8=; b=rajx1uCs7VhK8g eJaq86iqRe6jDXWDuRaiZfrQ/+ZX1SeUhdoyTo83tptAs35bUbM7yUS0vBi9uto19UrYkTZwm33Nf 3Vc97KiPp90YHvi8zJNjInT5UV5in6Myro40TuK55t85r48PE03UeydoBmemeXeaAv4SdSHDuhAaG Grlu+yUZlmbnGdXgxnsisrs+n9k2M+K5y9Fs3cgto/WEk6IHsGcE0zQ3orao9hmr+nOJS9d64S8l4 AAblgGdVHOxfdu8If5j71Zk5ZjYgl72bkH1Mw+KMoD10X+Vzm70obc+tGde+P2qEUKSz0YsQZkGCy zzqW0J8A6rq1bN+xSAtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MUk-0004VU-Ua; Wed, 19 Feb 2020 10:22:18 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MUh-0004UC-C3 for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 10:22:16 +0000 Received: by mail-wm1-x342.google.com with SMTP id p9so5871653wmc.2 for ; Wed, 19 Feb 2020 02:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9HvFBn5C1ybJ3Jl6cvECGju7iOD2DUuUpqtaZAjKhPo=; b=PJzH6ke5ACy+gnyH1H0O/EOH30mw1GGgrDUmk5BBrZ/PUN2lMzraTEUZ80YFeUJy4i BT0R8EBhS9ae4DJVQVeEUw4g7yETEV2yMkMheO3s0PZmlK2E8r1Rt8aaMMGH+iMrxZ2+ 6Km7jEfY3B17urqmHlHLEOm/FfWvNqws8o+K8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9HvFBn5C1ybJ3Jl6cvECGju7iOD2DUuUpqtaZAjKhPo=; b=Olah8qbERzyuiQBn79zO0oNxkNmoVLofP5aRHqUZe/ucZNBxlNMH6mT2E+qq8gwdDo dzdYEXd7XSy9U0j6IgTcY5Rd4HUFKzJOc3rJ9n4ucpmSC/4i7JULE+rru36gwPakg0UG 1Nu03QBxxnE9vQZf3gW3EtfF3tKxUCM/BqNcLSWDsU0QMBorepXhgS7WR4uw5ioDt79L Ciwpwo/sZFtCjmmd/ZBUvE4bwIB2t+WVVyKrELuQ+5tS1zhzUFMfI66ep7vvxN1ew486 bRPyO428CAPbQcUq5YacP+YltcZasVf9dknxJEd5TwlM5rg7k/ECwe2mwqsnUzDbDc3S RuyQ== X-Gm-Message-State: APjAAAXcpwMKM6YvG7SeHO1vPbAs+2089eS5THUTriWnUlNKQ5owdYeY cQjKRWUtO81uDB9rlZeL6tBO3g== X-Google-Smtp-Source: APXvYqwwkb8pYBRO6k0sbQ0TfL7rK6fN22BCq0dEtf+gNB0N9I1n8/PTpRHwumXVfIV0/n6efkAHzg== X-Received: by 2002:a1c:4905:: with SMTP id w5mr4798090wma.129.1582107733246; Wed, 19 Feb 2020 02:22:13 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:12 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 35/52] drm/meson: Drop explicit drm_mode_config_cleanup call Date: Wed, 19 Feb 2020 11:21:05 +0100 Message-Id: <20200219102122.1607365-36-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_022215_479595_29DA4B8F X-CRM114-Status: GOOD ( 13.62 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Daniel Vetter , Daniel Vetter , Intel Graphics Development , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's right above the drm_dev_put(). Aside: This driver gets its devm_ stuff all wrong wrt drm_device and anything hanging off that. Not the only one unfortunately. Signed-off-by: Daniel Vetter Cc: Neil Armstrong Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index b5f5eb7b4bb9..ae94d14ab7bc 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -284,7 +284,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) /* Remove early framebuffers (ie. simplefb) */ meson_remove_framebuffers(); - drm_mode_config_init(drm); + ret = drm_mode_config_init(drm); + if (ret) + goto free_drm; drm->mode_config.max_width = 3840; drm->mode_config.max_height = 2160; drm->mode_config.funcs = &meson_mode_config_funcs; @@ -379,7 +381,6 @@ static void meson_drv_unbind(struct device *dev) drm_dev_unregister(drm); drm_irq_uninstall(drm); drm_kms_helper_poll_fini(drm); - drm_mode_config_cleanup(drm); drm_dev_put(drm); } From patchwork Wed Feb 19 10:21:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11391019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EAF31580 for ; Wed, 19 Feb 2020 10:22:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C6642464E for ; Wed, 19 Feb 2020 10:22:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TOsyQH2+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="O3jdQvb+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C6642464E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wNG+f0aVZwzkhNaJkxXO2ki7ECYntQve5TWWcHrJWKY=; b=TOsyQH2+qG4hsI bTwt9yRLPIIYQomq5m5XZMl4YFb89gNidACdRRsx1oScbA6cRsltWxPBphD92/WtDX0rZtraGcYma /AArzAtIVrzD4gZ1Jz/qn/EHJXzLMfcBNeH6hNu76+3nbOTjK++ON9aAmYczK3ZEyRYEayEKuCr9l vRlRuRyw9BLdET6uFUcUKNpICdNmo0ZpDWn7LBH3a7KVZUr1UkY8c2f/v812geiGgOi+WDmsWGqVe XM18s+k47jw0kK10Jc0ZqPeyZMbzG8ykNRwbyrHGO2NnVnOqR1Oc0Tx459jath6PiRF3tsxpB3az1 0FAbHMIYjNmiXBLAzqnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MV3-0004nF-5m; Wed, 19 Feb 2020 10:22:37 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MUk-0004VS-Fz for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 10:22:21 +0000 Received: by mail-wr1-x442.google.com with SMTP id r11so27486879wrq.10 for ; Wed, 19 Feb 2020 02:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CMpRLsmk2k79rSr4KQhFtq3ElR3/0UtAr1kCQ3We7NU=; b=O3jdQvb+9ovBVXNh5T60os5D7I3PwklUDEkTtY9Fd9ZxslmOCcFYC4A2/yLdbjk032 FqeYnBrZcoCUFlQD3eyk2D16mIxakVQz+p2j+tZpcJ1x1CHjgdVbt6bxwMknwRIuv5/G z2vcwp88Gn5ikRGxdl6YqzL3Jl41rKE2zmDO8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CMpRLsmk2k79rSr4KQhFtq3ElR3/0UtAr1kCQ3We7NU=; b=kci9HJvNbU8SjGJm3Wx5hONv9CnpiGiw8CJHMGMIhgoBwO4W+syXYaAksGY960Eoj0 pNKsOVyzXU2HVx6oanmAUAJb+JIZK886SJPtAz8YRpj9UtMw2nlMdOGrkOk7E2dbhY0f ooyBtG8PsW+O8U1M6JuUtXlRtWX8m3sZsNk9J1hqycHS7n8zwgHaephSlupO9JAkvg31 f2jo5fTfevQQ6oBHPuquA9S/OcHdPOOXwlMRS6rtpOmvOeki9H22gdvESlfRqrF0EU/1 g4ooG2U8OolBsK70n32ZZ15viDocPe3q5oOA+wzaNkj9Bj4iucj5Mw4BaPhPDApA00/4 hWkw== X-Gm-Message-State: APjAAAXajVEgPVNc7Rkhq2KjCAUNouD2R+wa1UUmXUifXXfrsKyjK9Oj k7AMvIFQ202crqJCGyP5gLFB+Q== X-Google-Smtp-Source: APXvYqwzq2IJDg4cLJQDZGtlmKCnczEtj6OtQr/NmLMYBmqn9J5kT1N+Crv5wlJsBfOekrIHBGRkOg== X-Received: by 2002:adf:a35e:: with SMTP id d30mr32693147wrb.33.1582107736797; Wed, 19 Feb 2020 02:22:16 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:16 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 38/52] drm/rockchip: Drop explicit drm_mode_config_cleanup call Date: Wed, 19 Feb 2020 11:21:08 +0100 Message-Id: <20200219102122.1607365-39-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_022218_577418_33613CF8 X-CRM114-Status: GOOD ( 13.75 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Heiko_St=C3=BCbner?= , Daniel Vetter , Intel Graphics Development , Sandy Huang , linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's (almost, there's some iommu stuff without significance) right above the drm_dev_put(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... Signed-off-by: Daniel Vetter Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 20ecb1508a22..d0eba21eebc9 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -135,7 +135,9 @@ static int rockchip_drm_bind(struct device *dev) if (ret) goto err_free; - drm_mode_config_init(drm_dev); + ret = drm_mode_config_init(drm_dev); + if (ret) + goto err_free; rockchip_drm_mode_config_init(drm_dev); @@ -174,11 +176,8 @@ static int rockchip_drm_bind(struct device *dev) err_unbind_all: component_unbind_all(dev, drm_dev); err_mode_config_cleanup: - drm_mode_config_cleanup(drm_dev); rockchip_iommu_cleanup(drm_dev); err_free: - drm_dev->dev_private = NULL; - dev_set_drvdata(dev, NULL); drm_dev_put(drm_dev); return ret; } @@ -194,11 +193,8 @@ static void rockchip_drm_unbind(struct device *dev) drm_atomic_helper_shutdown(drm_dev); component_unbind_all(dev, drm_dev); - drm_mode_config_cleanup(drm_dev); rockchip_iommu_cleanup(drm_dev); - drm_dev->dev_private = NULL; - dev_set_drvdata(dev, NULL); drm_dev_put(drm_dev); } From patchwork Wed Feb 19 10:21:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11391033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C19B6930 for ; Wed, 19 Feb 2020 10:22:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9185024671 for ; Wed, 19 Feb 2020 10:22:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EGThYoyE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="liIx7Cqv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9185024671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Mzn4fOdirDZ4TFIgyNPPZb8Tfl9J8VMCsgVvCB9Nn4=; b=EGThYoyEbEAwfT 7TazUk32aQj3zcHLvfm+fqS+lqoLVn6Q1cy/60HEwZPdi893Nq8o09byxSYooOPNgw9jIcUwpDxjo hEdbR+ddtGOxur58b2S6ygRN1fjbTuzYz+0NbFld3X2q7KyNP8K/ao2TEUr9L/EDAOArNotkas+0a dQt8Axy16kOtZoRR1DX7sYon+wo4hDY1sjpLcGsG/0aiqStmktxiQTjc7hnqYvB+yIszRYTW4g4kt hu/kvw9TuPLXR8g5/3L7MAQXmm+Cj5FZ3jf5y4PUYa+pQAblMUduef7aIWCzXikSdqbBIAaKbvOrL L9ff4HOhK0lB8Bok/zog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MVC-0004z6-SB; Wed, 19 Feb 2020 10:22:46 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4MUm-0004VZ-QC for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 10:22:22 +0000 Received: by mail-wr1-x444.google.com with SMTP id u6so27602446wrt.0 for ; Wed, 19 Feb 2020 02:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YSnq2pVWW+HKeYXXYM7BB1vTVqLVzuXFgXE6h06xFu0=; b=liIx7CqvQUzNFoG4ELSAG3R9vmPB0o85DvqOnShuce4VgyiZn/mciQMBO1AhL0XJWg OjqpsJYMUaXd2uAVaUgmLW7I9Q0LCxuoUwB16ZRnK4xIZT3Zr6KbI1h43R1iQxSf1gxa lNBDHZGDLOUpLkxXfaGxaExMwBJNCUM1/5Zs0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YSnq2pVWW+HKeYXXYM7BB1vTVqLVzuXFgXE6h06xFu0=; b=UGGLQvd/7rHIiE0tNoCyf2hKjVLCGlYds9g+YApg8DUA0QmokQk3eB4ncrx0JmqvD/ 8rUnS7YbwxI54HSnVUbnCjlWh803Lg5Gj97xeesKskqK9VjRTA6sIuxwnwHdz9cbCHeO rcil1YZDabnoI9jinU1N6iqCrI1ArDcorD26dnaye3mW6smU6bxp2VDclb7xG9DsJs7U GJtt1seJJALbGFxgRYUV5KPXkkuNH7CiYsJlwGZhwpF/jbxp6hACFrD+9g4V7qB7BqO3 KZUGJJsY7/++K0VFr1ZxOa9WzMSk84zDt3L5I5M9952AV7RXN9JWkP+CFePDo/aiAxza vxqA== X-Gm-Message-State: APjAAAVy9ljej7bHb7UusGSKzbF5aMc6lzvgfURNS2YHxzAJHpHPza4f A+JF3b8TJy4pAhFN7MiUag3R+w== X-Google-Smtp-Source: APXvYqy/e8jWrTjkXr2HY+OkVTrZXl8KRtvIPL5iL9prazJwu6GqRHfncrGgKjSWy6Dh2gzsPrnj6A== X-Received: by 2002:adf:f5cb:: with SMTP id k11mr34513767wrp.63.1582107738038; Wed, 19 Feb 2020 02:22:18 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:17 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 39/52] drm/stm: Drop explicit drm_mode_config_cleanup call Date: Wed, 19 Feb 2020 11:21:09 +0100 Message-Id: <20200219102122.1607365-40-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_022220_932257_1D68640B X-CRM114-Status: GOOD ( 13.51 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Coquelin , Daniel Vetter , Intel Graphics Development , Philippe Cornu , Yannick Fertre , Benjamin Gaignard , Daniel Vetter , Vincent Abriou , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Alexandre Torgue Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's right above the drm_dev_put(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... Signed-off-by: Daniel Vetter Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Acked-by: Philippe Cornu --- drivers/gpu/drm/stm/drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index ea9fcbdc68b3..5b374531dd8c 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -88,7 +88,9 @@ static int drv_load(struct drm_device *ddev) ddev->dev_private = (void *)ldev; - drm_mode_config_init(ddev); + ret = drm_mode_config_init(ddev); + if (ret) + return ret; /* * set max width and height as default value. @@ -103,7 +105,7 @@ static int drv_load(struct drm_device *ddev) ret = ltdc_load(ddev); if (ret) - goto err; + return ret; drm_mode_config_reset(ddev); drm_kms_helper_poll_init(ddev); @@ -111,9 +113,6 @@ static int drv_load(struct drm_device *ddev) platform_set_drvdata(pdev, ddev); return 0; -err: - drm_mode_config_cleanup(ddev); - return ret; } static void drv_unload(struct drm_device *ddev) @@ -122,7 +121,6 @@ static void drv_unload(struct drm_device *ddev) drm_kms_helper_poll_fini(ddev); ltdc_unload(ddev); - drm_mode_config_cleanup(ddev); } static __maybe_unused int drv_suspend(struct device *dev)