Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1177964ybj; Tue, 5 May 2020 14:48:03 -0700 (PDT) X-Google-Smtp-Source: APiQypJANkBcPvq6tSNZSuq7vZ/ZBjbDjy+GKmJXZEpiW2kp7yKW0Rbb7Sm/VLidX1Y2b8ztup/T X-Received: by 2002:a17:906:da1b:: with SMTP id fi27mr4646909ejb.194.1588715282906; Tue, 05 May 2020 14:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588715282; cv=none; d=google.com; s=arc-20160816; b=XxpCaQY/MAyVawsLwfrZzStnbqQjEn22Y8rwol6TkM4+lyeyJj7IdxvwEkZEjGjEYQ +xvRl+xDpLRtKFZchuzlMzQvpu6sncJekemH3VaskXlSzHkUa6Cwm7Nbw0cjgxJ3Tywe KQUamy5JtY6zpV6hvjWN62GhC5wIJqwfhgiT6fbYdNJjXItzOhG6X2mgTrZlzkjcevSs ms0cWBFq35aidoYixOeSC5lxm/dT1wo2qzFbnMJ8zOC0oH85p/27zd6S2/aTqnqTju7y tbLnhNyI/q9bSug+4/dmlzF9WUrpcx7n4AfDFyG0cfsH7o6SJOWKljAOH2kRJWNooQ70 2m1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=R8NCAiVQGf1RfOegGjvzJMziYyDzp2bsCSV1MaN4Voo=; b=SapV4OAXP/y2IGDTwikF+B0o5D3+fwyqc3TNsS12iFrJd5SUi1JoZjk3rFNcHnrgFT MUxZTEMusB6x/EkdXxkVQJYs5k3H0F0MH9T2yskV+HO2G6RzLdXHx9AJJ2MwzIbOXx4s 8BZlhN9yR7Ca3IXgZY5GJECkTOh2hGDEsMk7qomHVXapYI5BlU2h3mrHwMUq0pMDScjb jJz5PL9MyoU/25JeSJWHD1yEr2LxZdAtyiy6hb96UXhBtbDrXfpyhtiZfSYr26Lr7HUN 0qrpV3ZR4VIBgMwT5gbOG0RPW0r8mB0f+l0gMIgF/l9fsjrsmJygjCymMAzWNxhbQFSV ivpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZIoXJJra; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si1942714ejy.194.2020.05.05.14.47.40; Tue, 05 May 2020 14:48:02 -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=@gmail.com header.s=20161025 header.b=ZIoXJJra; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729359AbgEEVqE (ORCPT + 99 others); Tue, 5 May 2020 17:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729284AbgEEVqC (ORCPT ); Tue, 5 May 2020 17:46:02 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5E4C061A0F; Tue, 5 May 2020 14:46:02 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id dn1so61300qvb.3; Tue, 05 May 2020 14:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R8NCAiVQGf1RfOegGjvzJMziYyDzp2bsCSV1MaN4Voo=; b=ZIoXJJraEJVdnimMK50llvgOXi7em9HScaaU0nSq0RkeBqNWbeZeE9X/srcFx5jieX qQl4234YJtVcJNFfaHC8xj6U0z+l2yZ8R1rCmZcg7w+E2X2wmfEaZVWHPdfyqdgwLnxt rYV+cfrjp5X3UvK8pjx2n/AAfKT0Gg8JQLWs35P01KX67S/rY/Kgh4qh1j+3391E53Mg o1ukd6V1kR6sjIlXVhCQHwhLYyVXjg8I9nGLRwn04GU+DGHf4k3QYo5hHx/DwE9nEyE2 tGkgEMN4ZUb3A2ScVWZtB8f2uKK4xj3hRc7ZoKy+xi34Rwv1rn2pxYkseY2QUOUCsyeB gfXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R8NCAiVQGf1RfOegGjvzJMziYyDzp2bsCSV1MaN4Voo=; b=DgPPMpGE+e9Wb7Zsu9Rpt45zNcOIZ2hVlsMtLwRa39JZNuSD0F1FIDvQkoqC+o7Sdp uTSLY+QCJ8xodhmNezLqoT6hvp5wXsUB2GrIZuqhjOGLXSFIsBuTJP3ZEwi5GIKV3D++ hQkI/e40TooBz3U4vllMh7H6FjRBUHbN5UNBqBnyPH/BdxH3744pMohnrQ/ACzCExwAe S4eFPu+65We481V14aAAkVjAPGu3cxM+aJ1kAqREvJbxy4sDycrqkaVR4azu66w/n/3b JwxIJ47SKZIwYI/+OTlgJh7DqR9OWab2TCJPHScgRXTBrFkMiTvPoLLypc+wDOFVkPrH uK1Q== X-Gm-Message-State: AGi0PuYUpiFuESTlp8IfVWyN0ggeFGXUnSViXhtum3iJkO2EmlcOnmOa V/0oMPgSBcvnhb3qtC4cec9BEGpQ1sK90luYDJE= X-Received: by 2002:a0c:ec44:: with SMTP id n4mr4828893qvq.237.1588715161652; Tue, 05 May 2020 14:46:01 -0700 (PDT) MIME-Version: 1.0 References: <20200505040048.132493-1-eizan@google.com> <20200505125042.v1.3.Ieebc5dcb6dcc116119a570f14786ba47c9007ec8@changeid> In-Reply-To: <20200505125042.v1.3.Ieebc5dcb6dcc116119a570f14786ba47c9007ec8@changeid> From: Enric Balletbo Serra Date: Tue, 5 May 2020 23:45:50 +0200 Message-ID: Subject: Re: [PATCH v1 3/5] [media] mtk-mdp: handle vpu_wdt_reg_handler() errors during probe To: Eizan Miyamoto Cc: LKML , Andrew-CT Chen , Minghsiu Tsai , Houlong Wei , Eizan Miyamoto , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Mauro Carvalho Chehab , Linux ARM , linux-media@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eizan, Thank you for your patch. Missatge de Eizan Miyamoto del dia dt., 5 de maig 2020 a les 6:01: > > This is a cleanup to better handle errors during MDP probe. > > Signed-off-by: eizan@chromium.org > Signed-off-by: Eizan Miyamoto Ditto > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > index c20ac7681c6f..f974242663dc 100644 > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c > @@ -188,8 +188,12 @@ static int mtk_mdp_probe(struct platform_device *pdev) > } > > mdp->vpu_dev = vpu_get_plat_device(pdev); > - vpu_wdt_reg_handler(mdp->vpu_dev, mtk_mdp_reset_handler, mdp, > - VPU_RST_MDP); > + ret = vpu_wdt_reg_handler(mdp->vpu_dev, mtk_mdp_reset_handler, mdp, > + VPU_RST_MDP); > + if (ret) { > + dev_err(&pdev->dev, "Failed to register reset handler\n"); > + goto err_wdt_reg; No need to introduce a new label, just goto err_m2m_register > + } > > platform_set_drvdata(pdev, mdp); > > @@ -206,6 +210,8 @@ static int mtk_mdp_probe(struct platform_device *pdev) > > err_set_max_seg_size: > > +err_wdt_reg: > + > err_m2m_register: > v4l2_device_unregister(&mdp->v4l2_dev); > > -- > 2.26.2.526.g744177e7f7-goog > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek