Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1890946pxk; Sat, 5 Sep 2020 01:32:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVW0Mj3HHemMPqGu1NUkWmP4EQ1SGpZvowVZpmbvg4b8Mcet4LSNESChjMo+SGm0WTScuO X-Received: by 2002:a17:906:692:: with SMTP id u18mr11322716ejb.43.1599294771832; Sat, 05 Sep 2020 01:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599294771; cv=none; d=google.com; s=arc-20160816; b=ZLUeXzP1zWtYEKnBs1cfY7F9VVsXxCKKWfjfGmPtq7LCSqQWpQUO9pv+U4Os6G3nEd qB/o7g8e4uj6A/dDv8jlJQUJcX+pOx2YOeEf22PN9Nb6mma3q3JepFvTewxZ48gYjgvf DeS1KTg7mXWJhBBAkJMnm5n4VrzFyBRBHAKLWOrcwgUqD44vmXOJlXzzNdf3yQZpN/03 7pHHp8A6k7E7zgL1j/jZsjUkh2htI3auWePivzxF0YrET3BssXMtiTbAkwHTzyTAf19M U4iL6sEuq4bZahxRUMmTxUNA0AGNBMiqKWGf9vY7BbrDn/8EmVHcFh15xvguy37ns0ro c0OA== 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 :message-id:date:subject:cc:to:from; bh=2t9AZ2oNNk4So9DXhdAirLa30ntAVPX8HwRITEcDqMk=; b=1AKG6HXKgh7BF5Ns8JvuBsNv8y66N4Twv8xuRJdv/0xLUUtlw3Xa4rf8LIHTQbkR8i GGnLYJDiiFhA3CRk4UeLrM6GOCqOuUl7D+QtwSjOafedizcpS0RTy6jNsA2KsLsbcXmd Dztk5Tc2Y0xem/gGlG7uO08r5LpQoR+ekTr3wi3hS7xJpHDvmJvVP9I+Is/AIMjT2/PW cWCe9+SYpgO0w3RBgbV7EO5fCCXCJE1etC4WrWQaIVLJUtIn3gUzTr9C/3tiPlRWCbqK wm/7N3j1Nnlu6dzUMwRrhgnGydayMWtIbp9HxyYeym3zMNeahfvjcXrxrsCbzf0lXUYf 1wqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r1si6190279eja.170.2020.09.05.01.32.25; Sat, 05 Sep 2020 01:32:51 -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; 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 S1726568AbgIEIbp (ORCPT + 99 others); Sat, 5 Sep 2020 04:31:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10821 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725818AbgIEIbp (ORCPT ); Sat, 5 Sep 2020 04:31:45 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9013058B589323AA0492; Sat, 5 Sep 2020 16:31:42 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Sat, 5 Sep 2020 16:31:32 +0800 From: Yu Kuai To: , , , , , , , , CC: , , , , , Subject: [PATCH] drm/mediatek: add missing put_device() call in mtk_ddp_comp_init() Date: Sat, 5 Sep 2020 16:30:58 +0800 Message-ID: <20200905083058.1631726-1-yukuai3@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 57c88de9a329..526648885b97 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.4