Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4082726ybi; Mon, 29 Jul 2019 18:53:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmPXGqpOCCoHDAJjqCOZkKx1K0UnwfyBcInfa8JuBxPah6fsLU1qaj1Itk6aZf1RXNYmtm X-Received: by 2002:aa7:8817:: with SMTP id c23mr39962616pfo.146.1564451602428; Mon, 29 Jul 2019 18:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564451602; cv=none; d=google.com; s=arc-20160816; b=ERybSAXiqLm3r0PyoITsPqpnn38njVCsLr01FTXekXydWjScQ87X0otYHXHipWhJVu pS5gqgbZ3sqggN7RFqovD8Zm05EJKVf4Dl6ueopNsbW93x/8HQdnHsYSUiB8+FNCPmZJ pC+HHkDRwC0Axmj+iLw2Nnf4SAwqbBtq5QsH972EJCaLl8R/hhLXIyLuCQ+E3yi1kwcm y4lxEWiLpUldR23cogqDZzW7TNL7XfMCur6tImod1rFfmX7wuKG/ejImExS6mRP3+9TV YCWNsiDGhpjXLOmxoR5+NjN+fsYkdR2bRrUz2nSAIXu5M2Woh5bkOsK2d6mCZAmTMk/7 hPuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bUacVhZj9yCWAqSVBnnUPiKHh1+FY4XZBn/e0utaTLw=; b=joircEw0JdMYkPaodNZmbmrK7LHoliyALX38a2tXt00C2mVYoFxFt1bL8No8x5+esK 1q2vLSHXj7VoavkPbztMmOuv5UjgeBVw+9zDjeRogzoryB+GOCFVA79HKd/IWz1byp3r xmROQX+CPnLaQHpSo6AezzokNRMhtR8wjt+8+EMQphJpqCpa/gGRRPdhBVxDHocaO298 5GMKSONi1SiOnmik7M7nVw0rO/EWBnn3S16R60Is6TnuNIGK6OsLIxNFiKfUHLmz5aok u1DDm8taE2TUabtgJs8Ab6n3W/qDiLYLPjf4DkjIF9awDcT/ZGBC1C+LFC5UhIncy4DE FRDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rUg9bgrp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k190si28453215pgd.212.2019.07.29.18.53.08; Mon, 29 Jul 2019 18:53:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rUg9bgrp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729611AbfG2TsK (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:38098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390165AbfG2TsH (ORCPT ); Mon, 29 Jul 2019 15:48:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 414A9217D6; Mon, 29 Jul 2019 19:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429686; bh=sPGWWvnRK3lCpC2z96s5vL/h2YymgXEfM+MvPi/C/3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rUg9bgrp+/TYm69TUMBy5iOUCxGwxBkkhTBSzmP0DnLcU4PgyeC1w3Ki3zKPff1eM yPqWjIhpNt+nUjaSiZg5L8lCXsys9l/ydcchDmq4/PFXJ7+Uib1L1Go8AHeotcEbI3 0p7+20QjoeIODvTnruGYBv+yurK4O+7Pr4fzreGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Andrzej Hajda , Sasha Levin Subject: [PATCH 5.2 061/215] drm/bridge: tfp410: fix use of cancel_delayed_work_sync Date: Mon, 29 Jul 2019 21:20:57 +0200 Message-Id: <20190729190751.102055862@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit b1622cb3be4557fd086831ca7426eafe5f1acc2e ] We use delayed_work in HPD handling, and cancel any scheduled work in tfp410_fini using cancel_delayed_work_sync(). However, we have only initialized the delayed work if we actually have a HPD interrupt configured in the DT, but in the tfp410_fini, we always cancel the work, possibly causing a WARN(). Fix this by doing the cancel only if we actually had the delayed work set up. Signed-off-by: Tomi Valkeinen Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190610135739.6077-2-tomi.valkeinen@ti.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/ti-tfp410.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index a879aac21246..3a8af9978ebd 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -372,7 +372,8 @@ static int tfp410_fini(struct device *dev) { struct tfp410 *dvi = dev_get_drvdata(dev); - cancel_delayed_work_sync(&dvi->hpd_work); + if (dvi->hpd_irq >= 0) + cancel_delayed_work_sync(&dvi->hpd_work); drm_bridge_remove(&dvi->bridge); -- 2.20.1