From patchwork Wed Oct 23 12:09:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 11206473 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 526FD13B1 for ; Wed, 23 Oct 2019 12:10:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 3888820640 for ; Wed, 23 Oct 2019 12:10:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3888820640 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADD4F6EA5C; Wed, 23 Oct 2019 12:10:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFEB46EA5C for ; Wed, 23 Oct 2019 12:10:01 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id c22so10307870wmd.1 for ; Wed, 23 Oct 2019 05:10:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=GCCFnxfgctiR7ujkuq6S73RHOtLBZpaj2MQBUfolKvQ=; b=ho2Gi5YaNiWDETGtExxCtpCL4O80KaNsr2zTR/JIiZERymXmfE7nTR+NoEpj72sUNh +WA26v2x6Vmt1Svfbh2dS+NN0rjTCCmL1mgIWayMWMaVAlM8ahEa4AaST0XBJxfr/N00 FFNnJop7HAG34rC4QjG6POAMg8CdkAeVxLyk2dhDFyH1sBeKSPuvCQwLb8i/U5n08aGn oFN56pUVuO2CE+jYBS7DwKPj2E4/kQIW6vKKzG+9vknUzYwUL/tUCmaRHd/OlbozKSgB lTDGIpV14rV/+aRr5aTHJHQvW2oELD3u8ZVw/i1ewCm+7Xa3JXq6jR4p+grv8BAX88Jk o8TA== X-Gm-Message-State: APjAAAV2y3/oQjOZkETTw8lhX0Ex7cGwpYG3nbQLBUlzgYQxYWWq4vam h58VrvibMywT2h5x0fCrAyg= X-Google-Smtp-Source: APXvYqwnT1P5lpTKGC9oq14j3EyMYmkpka1Vii05lwYOx5CHpyeTJMni1eoCxD3yrgrjTtag5l7jhA== X-Received: by 2002:a7b:cf30:: with SMTP id m16mr7709573wmg.89.1571832600353; Wed, 23 Oct 2019 05:10:00 -0700 (PDT) Received: from cizrna.lan ([109.72.12.196]) by smtp.gmail.com with ESMTPSA id r81sm15016575wme.16.2019.10.23.05.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 05:09:59 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH] panfrost: Properly undo pm_runtime_enable when deferring a probe Date: Wed, 23 Oct 2019 14:09:25 +0200 Message-Id: <20191023120925.30668-1-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GCCFnxfgctiR7ujkuq6S73RHOtLBZpaj2MQBUfolKvQ=; b=uWe4GxxaDPldHT/awU5IWmMXWiJX9zobzCZrqq+ZyDgb8jfdBUOR+PX5YFHdwI5/lC wNpaXg392Vm9jbCkVRfCu90EPUw3QQyy2Ow8C+AlRv+LtV+WVRkv6x/6LrOJr3mL/p8i k+O5wtlrs7XawlVq/0CbZKOc2Csr/QHg9ZqoZzPmac1Moazeg85zhHVWOpabc5VYPTpS R0weZTve0KM/FeioqgXhcJSzVojaVzAWoWKNRSZzVKSS2QdDbHNbaTC9wRwa+vDjDy4b J/vkMN7tTgDu/j6WkExePmXeAWgMxXVGkYUH7BMapWPdxflWaLJ8pBMUvMUmk7ZxTVuJ eRog== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When deferring the probe because of a missing regulator, we were calling pm_runtime_disable even if pm_runtime_enable wasn't called. Move the call to pm_runtime_disable to the right place. Signed-off-by: Tomeu Vizoso Fixes: f4a3c6a44b35 ("drm/panfrost: Disable PM on probe failure") Cc: Robin Murphy --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index bc2ddeb55f5d..f21bc8a7ee3a 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -556,11 +556,11 @@ static int panfrost_probe(struct platform_device *pdev) return 0; err_out2: + pm_runtime_disable(pfdev->dev); panfrost_devfreq_fini(pfdev); err_out1: panfrost_device_fini(pfdev); err_out0: - pm_runtime_disable(pfdev->dev); drm_dev_put(ddev); return err; }