Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp606930ybj; Thu, 7 May 2020 03:27:13 -0700 (PDT) X-Google-Smtp-Source: APiQypIG1JJ/tjPsajZV1LDMeqhF38KoML9S2fmDj5RZZifZ/V8Hi8IRx2wlRGZw0TjsbYPbunXi X-Received: by 2002:a17:906:9a1:: with SMTP id q1mr11177992eje.296.1588847233062; Thu, 07 May 2020 03:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588847233; cv=none; d=google.com; s=arc-20160816; b=AxlkuDCcvWUqSx+4+0F+IFlOcAWpxvNNHErm0iHGoMEVBoKPPRSckgVK5TkerL18Oj 6nfpSs/XY1KKXhSNCZg4fSWX8oIa1JOxO84fZVfxu+CcLCQCne0C5427XqQLANi9ZNdn v2hJ/NJ2lM8hVgLoJkxAPGcviYzacVnrAUgwqQdCkzjFNWmOF78eab7ccLLIXUT2tNik mm9uJQepE5tMyGEcgsSP89Bh8+ZwohkFd3Wp/QrKzy2kGSJtuR7QaV2I4mBXbg4qzZrl LRz2eMpCWOHSGeuj5sbLNUYkaSxnvz5Uq4tWSmmhpFcejMQYksjQUf70BwJ0RHXhaRSb 3tJg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B/Mk9PnpQZ4xKWEBXlLMDvhktcZ9bgwGO85pTWBmd1Q=; b=WBGcvBnRi84JRIAU5XhGd/nnWNeOFZcSEHp1Z1Vkn8eHbWVlDeC/nZjdEfoZHmYtbB 7UnmeRLhk0FujJuuLBX6hnGp4iKkOMRLmpydVkn1bk4NKyb8j4UuhE/L6dBEDm4CZpU3 cdEO6K6W4mlSC6xfyq8FcKFrF9zMyg2BVwNrODqz13n8RiS+jWwHQg9jJo4DDfffwC1H zS7LcEkRJfUVvTzJ63KSDGX/Rsl3iFlmxmOjfZN4XdVKnJ+1dq9WdJ1cR7cPw0rPka9V 46dDCK0e20qdkcUjnOT/hTT0YRmfrEk4Evg8wvhW4cGUtIJ1+Mp8HrCyym/SPXR7++1X AL8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Uw9tkn4t; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3030917edw.426.2020.05.07.03.26.48; Thu, 07 May 2020 03:27:13 -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=@chromium.org header.s=google header.b=Uw9tkn4t; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbgEGKYt (ORCPT + 99 others); Thu, 7 May 2020 06:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725949AbgEGKYs (ORCPT ); Thu, 7 May 2020 06:24:48 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA513C061A41 for ; Thu, 7 May 2020 03:24:48 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id s10so1904535plr.1 for ; Thu, 07 May 2020 03:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B/Mk9PnpQZ4xKWEBXlLMDvhktcZ9bgwGO85pTWBmd1Q=; b=Uw9tkn4tmqYAbTMf70CLe39oO9q1CC6aVjLT1Rme6khxLYX4hxUID3ZnvBSZGakv5P cGKuKJqk2HPHbQ4P1iQd69NwgL2xHQejKzAHF3MGaRFbXyURliEk1oHrAxQepDxSyXed VFbE4tH2UIH74TV9w+cRWY5I37BG/H1vO1EhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B/Mk9PnpQZ4xKWEBXlLMDvhktcZ9bgwGO85pTWBmd1Q=; b=pLmHcz2WzFnIMff9o/ThjdE/oB2opGNSPn+xYkTHMgopj5ydhI7aySgkIVmrZWccct rH1Nf7HAY8E9f7VfrzvHs4EJA72EggvaigoIQZcs5+l1m7BGf/BeFRtvuqKeHEefB2zh gGXOl/OYLpSeMwhDUIWR2qXKG8hHY08cyP1mIttyJVoutJrPbY4jbZwzAXjW86BW+bEG V3tM9b1zgUHjL0esyzLqQCGmLwpV8HemmPnkenZ8RZouP+NHCEVPL5W6SEJUfrK67ebh UfFLbzVj3uzm3eXkTp1fgve1TPXbo+5Xd/t0Y2tiETvIQ1gbjZUIdwLE6wWzEHHqyIvn IQDA== X-Gm-Message-State: AGi0PubSKfRSmS1KUCmJpmuuWo5VjmczAcgMWCfuopOzbXfLsnTyz66F D+iDNIAipDRfu/1N0lVK+/ys0Ld9c0k= X-Received: by 2002:a17:90a:b78e:: with SMTP id m14mr2742862pjr.114.1588847088130; Thu, 07 May 2020 03:24:48 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:a92f:c47d:76a8:b09e]) by smtp.gmail.com with ESMTPSA id a138sm4514903pfd.32.2020.05.07.03.24.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 03:24:47 -0700 (PDT) From: Eizan Miyamoto To: LKML Cc: Eizan Miyamoto , Enric Balletbo i Serra , Andrew-CT Chen , Houlong Wei , Matthias Brugger , Mauro Carvalho Chehab , Minghsiu Tsai , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 3/5] [media] mtk-mdp: handle vpu_wdt_reg_handler() errors during probe Date: Thu, 7 May 2020 20:23:46 +1000 Message-Id: <20200507202337.v3.3.Ia8efd7905e2fcfc81f547e27a51f06373624b3da@changeid> X-Mailer: git-send-email 2.26.2.526.g744177e7f7-goog In-Reply-To: <20200507102345.81849-1-eizan@chromium.org> References: <20200507102345.81849-1-eizan@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a cleanup to better handle errors during MDP probe. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra --- Changes in v3: None Changes in v2: - remove unnecessary error handling labels in favor of err_m2m_register drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 8 ++++++-- 1 file changed, 6 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 9b24b8d46eb7..17d155219ba2 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_m2m_register; + } platform_set_drvdata(pdev, mdp); -- 2.26.2.526.g744177e7f7-goog