Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2536089pxk; Mon, 14 Sep 2020 16:41:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk202wGnRqh2MVDncXtSR9qFfFvBjHMhcHUAwgBT2hoFXOtyVSRWkqYBfaXx3+qq62XyVx X-Received: by 2002:a50:d802:: with SMTP id o2mr20006025edj.152.1600126869293; Mon, 14 Sep 2020 16:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600126869; cv=none; d=google.com; s=arc-20160816; b=YXqq/HU1Vrv8RhEUv6/dAcnm4Wk31fsLUvonZXjHY7/qKOgOtBZVGP2+W3AFCkeC4+ R2lrVhD0BgfTZrUXIzZGDF7A3qqzO6HSqOdSxXqO3B4Z1gt7oNOhIEsNDZ5uhc95soJE +MtcK1a3yhAFDyrymag0KB9fjfbPOEHxkwJ1KMTyy7r6cF46q+Kud2+iCHigVlsH0zuv at3E+ludlPxXS3nF+i2+x+LYPL35X9xJ8oc509OKxW5/StUCcDG/CkQ/FaZNV8dDMcK/ rmBRJpFSmbd4kGLmg7h1NtSV67CGi0lxh60gJHYc3r8RlExOqZqHX+T9NWP9V54sOy+d roSw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TniEX9NwwxhWyyDmN2lAnjCvuojDFXB5cX2Y6buWk/Y=; b=uslKyeXY1eT6h9aL7ITsl8GlHZsz3hexzzcX0i2WTsl2kyWVtQFBy/yYo0RSk8I1sx 1RCtXiTyLLQkedaLTtkYa6/OOJMMB6qMPK2VFFp+dVp8Bzwx8CkPrGnIXMVFXkJyKvg0 KDAcUoKnNGpoQN5OarJrLdME+Mr6jixpxWBt69LbkNk839jeyvvXtURuyBHfjB+1EbXr CyqzEHhe76pvS1VnTNcQGZ7U45iLbzYzj4q0czn1Q/cXQ4hZ+lq5XjZm1koyjVnQiO/1 gQX5ckoKbmdwxAJgot0zMmHG1Bstn0RgLnzPs9GZyOzPlQQfALSEQ9Q3nPHU/ck03bvX FYCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Is2F32TU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si8926101edc.174.2020.09.14.16.40.46; Mon, 14 Sep 2020 16:41:09 -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=Is2F32TU; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbgINXhp (ORCPT + 99 others); Mon, 14 Sep 2020 19:37:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:43180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbgINXhm (ORCPT ); Mon, 14 Sep 2020 19:37:42 -0400 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 118AC2193E for ; Mon, 14 Sep 2020 23:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600126662; bh=g2lsFfYhlO0VEH/BabeBJeUV+CvFozoYV2u4w8DDEBQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Is2F32TUQz6dAc2CCZZJbm2PVGfeKFWGtc8X3UHHkFTabwzkYsfVtwx+Z5/4eYyZ6 5p1HC3vfP/d9JAlvYrRjHyJJ3Tu6Glimmyv6DKj7IPBdaCQFMZrd4WQE3jVpCaU7W+ 9Z+5ch+Q60DGp6haUsuN+RdUQVqSNkckOwja6/6c= Received: by mail-ej1-f43.google.com with SMTP id r7so2313929ejs.11 for ; Mon, 14 Sep 2020 16:37:42 -0700 (PDT) X-Gm-Message-State: AOAM5301LO7sjs2vnsFE2Zh/dwNGdeDAEbe9GIre6q/UHkjt0ozTYXqI lizxQ9yUhAd13oeI2XsURY8oOJ8bZdgX3gb6OA== X-Received: by 2002:a17:906:15cc:: with SMTP id l12mr17632462ejd.7.1600126660682; Mon, 14 Sep 2020 16:37:40 -0700 (PDT) MIME-Version: 1.0 References: <20200905083058.1631726-1-yukuai3@huawei.com> In-Reply-To: <20200905083058.1631726-1-yukuai3@huawei.com> From: Chun-Kuang Hu Date: Tue, 15 Sep 2020 07:37:30 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/mediatek: add missing put_device() call in mtk_ddp_comp_init() To: Yu Kuai Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , yt.shen@mediatek.com, CK Hu , Bibby Hsieh , Yongqiang Niu , DRI Development , Linux ARM , "moderated list:ARM/Mediatek SoC support" , linux-kernel , yi.zhang@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yu Kuai: Yu Kuai =E6=96=BC 2020=E5=B9=B49=E6=9C=885=E6=97=A5 = =E9=80=B1=E5=85=AD =E4=B8=8B=E5=8D=884:31=E5=AF=AB=E9=81=93=EF=BC=9A > > 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. > Reviewed-by: Chun-Kuang Hu > Fixes: d0afe37f5209 ("drm/mediatek: support CMDQ interface in ddp compone= nt") > 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/dr= m/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 devi= ce_node *node, > #if IS_REACHABLE(CONFIG_MTK_CMDQ) > if (of_address_to_resource(node, 0, &res) !=3D 0) { > dev_err(dev, "Missing reg in %s node\n", node->full_name)= ; > + put_device(&larb_pdev->dev); > return -EINVAL; > } > comp->regs_pa =3D res.start; > -- > 2.25.4 >