Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3295728pxk; Mon, 21 Sep 2020 09:57:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCxsBavPjjeFhY9/sLA9iSl0gKtf/bTqjpQ//emg0o7qKtvLJmjkCzMJAjDz0wNx3A9M/4 X-Received: by 2002:a17:906:f897:: with SMTP id lg23mr390491ejb.89.1600707431985; Mon, 21 Sep 2020 09:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707431; cv=none; d=google.com; s=arc-20160816; b=jqOsiUNIeduoRfjOwZaOr4IzC3YdIHUp130wUAcTsX+s6ZlNTzwufhpV7F5qupJDVN bFUd85XdlN3WvSPg+0P1rA0b5F06Ff27/C7wHqYUngrcPjfRPkwkqBH5jk2QJAJhFS1p HXggQ/aS7GTJwcMAcf6GoUu941va97LpR/2GKZbp05PEImpqWF0k13cvKyYdwN1uiMZ0 CzOUHFnAnWpg27OtViKUwbdJHtg1GsVRoNqeJ3j8nG/LP+/N8VHLyiJQGcv22slDquxO 0GUCFe/eZeU4C3tsRxIxGdkjsbIAT+w33ulP3zJRviO1AxQIXUm0+l/1i4EcCPGwO0Es DqBg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4CESTbNdQd8o2tIm6MVxBNBWWboaUhBmT1AXG5sseso=; b=XSHGshryYxux8TFbO8EO4BXRsaQs2dV8djEdEJ8+19bfc0xcwCD0skH8PmHV34YM0G aIR4NH5PB0UjApZnEB+vzTNHO19v30temPOCEiFZSPkOGora4FTWEufBBYwI0ORckX68 CRtDMllxDYXDTlv+NRYg2AvgPzhvI1KQ8kj4pLg0fIyxDs3xVFHNowVCLQyatLPR68wK SdGzLMPamMc0wPJSTZzqQvWM/BiOava++rw8TtEvkHINHuy6UVnV1fb1AK5DIAtXGhj9 qCXiG/70BvKDpC5H3Xdh4/7lEFAbhnss0iK8W0Niiu1fLAi98OlTVjC+jbVhM3geoJFm kXVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rI4ecV6p; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si7587746edd.255.2020.09.21.09.56.48; Mon, 21 Sep 2020 09:57:11 -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=@kernel.org header.s=default header.b=rI4ecV6p; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728228AbgIUQpc (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727338AbgIUQpV (ORCPT ); Mon, 21 Sep 2020 12:45:21 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 DAC3E2399A; Mon, 21 Sep 2020 16:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706721; bh=xjZXQcpiIWSbrq4vUTAl/BD54Tv1jv4rLS9iNd3uiJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rI4ecV6psF8RabxVgCXrwRMe95yzGgPWe+LMOCrYvHIOWcTl38bSdn3xqSqpYvpWK Rn+TSiXk6SAiHYhKc2cVQxe4/L/GXCy0IuN0GZcaEMiGY41cYC8tnvcGpU18S3t4kL deoW3mmMWgTCl0A3qAzV/bd9ep6gV9IBFQLxe/go= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Kuai , Chun-Kuang Hu , Sasha Levin Subject: [PATCH 5.8 068/118] drm/mediatek: Add missing put_device() call in mtk_ddp_comp_init() Date: Mon, 21 Sep 2020 18:28:00 +0200 Message-Id: <20200921162039.505702820@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Kuai [ Upstream commit d494c257271153633a05c11e6dec85ddfc7700ee ] if of_find_device_by_node() succeed, mtk_ddp_comp_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: d0afe37f5209 ("drm/mediatek: support CMDQ interface in ddp component") Signed-off-by: Yu Kuai Signed-off-by: Chun-Kuang Hu Signed-off-by: Sasha Levin --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index 57c88de9a3293..526648885b97e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -496,6 +496,7 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *node, #if IS_REACHABLE(CONFIG_MTK_CMDQ) if (of_address_to_resource(node, 0, &res) != 0) { dev_err(dev, "Missing reg in %s node\n", node->full_name); + put_device(&larb_pdev->dev); return -EINVAL; } comp->regs_pa = res.start; -- 2.25.1