Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp269875ybj; Mon, 4 May 2020 21:05:46 -0700 (PDT) X-Google-Smtp-Source: APiQypLDVSUmV8ckmHbthHNOk1a3yynyc6UO8uIFOZjWZCm3sG1isEPIlSjM/zAZAK8u3MwjSH9x X-Received: by 2002:a17:906:68d7:: with SMTP id y23mr949413ejr.85.1588651545921; Mon, 04 May 2020 21:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588651545; cv=none; d=google.com; s=arc-20160816; b=iNg5XinbU8guYTDMx5AcMg/W3sK5HU/bP/Qmz7KBNOxhe6fX4iUki9KzMSI8DBriZ2 vYPrajWEVHF2McQ+UqfXwpH3byXMg9Y3jwD4wYFw7L4HIKmxB3BGPokENtOdatClPj5D pnU7Wl3SUFPVQhAvCKx31BG8S9BvRsSBoi49VE9HX+FzxsjOS1HMrDPoeO0rud3CAsvK BtXOWRP7sjKQHkGaJ3mlWZDNnj+Xa9ylIJGczmyuP9eAZkoKtiX+Xrtmjls4MFtCty5p P0sWVl1ieODT0M3mDA6GC2l0Rk/lrl52+/PdZLKPrs5yd5Sa8wxZeOb9lpxwENCFtvJd iKjA== 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=fX+wHjDnbtvEkbbVe2K/ppkZQlF0JTMhhwiYwZiHruM=; b=0S9k7ebYHN+pnS4nzXlBe42pTYu4IT05GDJMJZtx6m/k/4wl7sYuKq1KkOHG9/hjNQ xiAGj9Hc8tHpbvtr8aQ0mbZX9ZwNZH8uVx5fXIxaDfy5UjjVNeS6rUMIupJUS4UPBsLj FOSdjC6eiYG9YZScjTX8NUFnrOMZk0L8CiErDCzibFHSxiFK8nRW+DXmS2Tnh7VNIjOD tB8xGMQkucRnEKQpFX7YG/FdnXEms9NljeOX5VD6lnIEsvevnW9E9cHEM20T0lAnU1KC 6W6+F6DGiDpjv+1krotbZJqYN7Li4aXexHd+6xeBWWheLf+Sod8kGWtrT/kqW2gioiPm EozA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=doZmY9Xx; 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 q7si594194edr.137.2020.05.04.21.05.23; Mon, 04 May 2020 21:05:45 -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=doZmY9Xx; 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 S1726885AbgEEEBd (ORCPT + 99 others); Tue, 5 May 2020 00:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbgEEEBc (ORCPT ); Tue, 5 May 2020 00:01:32 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA69C061A0F for ; Mon, 4 May 2020 21:01:31 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id q124so431043pgq.13 for ; Mon, 04 May 2020 21:01:31 -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=fX+wHjDnbtvEkbbVe2K/ppkZQlF0JTMhhwiYwZiHruM=; b=doZmY9XxEuZl1yzo+blKvEuGksayzqeE2OAKNN0mF76DL6R0CrL75vtszNR4kDzPyW 4GEREd5uYoerxfbJSi4kbGiHtp9dKhMwE3I7zjjEorWnm8Dj/vrkXc1V8tlEWlX3YY9P Qb6DJuLF66dcjaD/xB/cOn7IqyTVNpGm/HaVM= 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=fX+wHjDnbtvEkbbVe2K/ppkZQlF0JTMhhwiYwZiHruM=; b=YmDF8dbXvf07f9VDuCVqpEIVy+TwiaLgZL1ufsTic3WdZuho947PbsduBudYkIQYxm vI04srD87YfUkBxWfvDFhuYb2ZjQB/Cz06onoNSJUgnw2nyX/Z/p/Krf9VPFj3JCEpRO gP0gvFazaPDRa2Vg7YYSmY1+nEoYJfgMRtbEAp53w8Pf/gsp6KWWdq05fJvOtRh8E0k6 t0ejVT8Li3x7wNmbDIXMclFlHSO30O6EW4a8FIiO5BX4ksXhAdl6ZWm8ItgfsjpbuHI2 7Xii8PaRN+HPu3LhWwanBIyyTzwe3Ef4mV1SZMgk4VIAq0Fnj4YALi2wmX7op/jRZlbM 5M9A== X-Gm-Message-State: AGi0Pub45NrS0YBGUDsGnJXGlj0Yq7aZDge7dY+/+FCLqOvp9ioLRs/M PtQw0/4U6CWJvwvFSUKkNjQXV/+OaGA= X-Received: by 2002:aa7:9683:: with SMTP id f3mr1280844pfk.278.1588651291099; Mon, 04 May 2020 21:01:31 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:a92f:c47d:76a8:b09e]) by smtp.gmail.com with ESMTPSA id s44sm481696pjc.28.2020.05.04.21.01.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2020 21:01:30 -0700 (PDT) From: Eizan Miyamoto X-Google-Original-From: Eizan Miyamoto To: LKML Cc: Eizan Miyamoto , eizan@chromium.org, 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 v1 3/5] [media] mtk-mdp: handle vpu_wdt_reg_handler() errors during probe Date: Tue, 5 May 2020 14:00:46 +1000 Message-Id: <20200505125042.v1.3.Ieebc5dcb6dcc116119a570f14786ba47c9007ec8@changeid> X-Mailer: git-send-email 2.26.2.526.g744177e7f7-goog In-Reply-To: <20200505040048.132493-1-eizan@google.com> References: <20200505040048.132493-1-eizan@google.com> 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@chromium.org Signed-off-by: Eizan Miyamoto --- 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; + } 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