Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp606623ybj; Thu, 7 May 2020 03:26:37 -0700 (PDT) X-Google-Smtp-Source: APiQypKB2dO64yTGu9bpwGLm77YKy0qBIRCDciYXVLvG1mGCW2DXfv1Zzv6MPtEipXRENGKf7RKI X-Received: by 2002:a17:907:214f:: with SMTP id rk15mr11491816ejb.301.1588847197779; Thu, 07 May 2020 03:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588847197; cv=none; d=google.com; s=arc-20160816; b=X0/ohyy8CuPmY69jfjTNmWzklydzsHcdl+Kf6sHNncObLbB3l8e0z/0ae9GGnBVl6G k/7w4cFdLjsqCpHuknmozgYXi9yQfH27rAjcJB1+khUqnUiBGpQUhLPvfUl3uU++6WsV 00t97nOx3kkT69ffhkqOKTEXAvJ6cFANyvGRds98px+QRnVeohoMT2mcOcqdS52QVTrO AvLDOX2U/EQ7ptfXJL5ER96HkxPXPljWWf7YX1XXAsQ9Y68kBkUu7M3E0W3p5o1m13o+ mq3uea0FlN3Hzx1wf7aCxxd46skCW6r8viqTqwWFkhO/gZm+2Yfed24aqx7G1ZSu/XfJ pLgg== 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=uayLP2IQIIMajpdlHbzdkBKHnRVFxtyMOMcfphNpLD0=; b=Ti6xE2uvTIhjosIKE7wsWYqhRFbPic+kMEtfgFBE6I/Q51i5OVf9xQnFDPQPmFYS/n qmPJZSgI2lBGxd+LBESPk0DOJ3U/LrVVc2nOhhNVqHGknRj1cqPA5JaNlMsJrCEYrmzf p6Lb4l3/w5OExMOiIpgo02QQbeoRoUCijol7fMJQ8K+ea+5gAiQZxHsZiUjMKKaeaz+l /MWJSit1Xr3WM+Muj5PF6D/FSRI17xgoulmWMxXgHG6ZBAMpQWawqSkFrn8aT7UHpxtz 8Q57iXRiWX8KmfpoRTMQHM1l4vS2SN5rRsYPFfnnYeykdTwkdWeyINlwH/ULvXKpSI9l gdcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GNMgHUHa; 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 x17si2962947edi.409.2020.05.07.03.26.13; Thu, 07 May 2020 03:26:37 -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=GNMgHUHa; 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 S1726480AbgEGKYd (ORCPT + 99 others); Thu, 7 May 2020 06:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726093AbgEGKYc (ORCPT ); Thu, 7 May 2020 06:24:32 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F25C061A41 for ; Thu, 7 May 2020 03:24:32 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id r14so2811782pfg.2 for ; Thu, 07 May 2020 03:24:32 -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=uayLP2IQIIMajpdlHbzdkBKHnRVFxtyMOMcfphNpLD0=; b=GNMgHUHacwUvRBlDY0qArxRb4Pu+eWtZHMaGVHLWsilTyL8VGV+tTJxWb2nMRZdoEr xamhmauOh8CrNbLvXypYcr9cM5xkCl36Xi5ODaECqcmO8/fbNNAhFJBSKsPF8+d+2rW6 t52imrK2WKyuJMQ4xYUNExzjoG8mXm/7OAnQE= 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=uayLP2IQIIMajpdlHbzdkBKHnRVFxtyMOMcfphNpLD0=; b=i4pw+I3deySROsRhOnGC2HxjByZMGzfVeZDdJAv3/5D442bzWO0iV9SfmNfJxQxP4L E6qEfabwIWXRRCg29CSZmsTckgVOg+P8KAI8dZOcENcYk94y8pPp1P6E6nePAB84FLU7 w7kaERkkBMoR8hMexxjxqBR/XbpmutthOSBha6p/MHI25eNeZDX5x7fN2M4zA/f18EEC GyoQ3dx2XWe+e5xukJP+ErRlXtxkymDci7ua/eXedMlr+KeESGiHC0J1BLG4i7GRhvfd xiDfeMSrrRFMyDbuBkPPJ3dA0xQ+B/7LQmt1V8qTs1myLDpQlssneDgbWuYn8lmlUhCj Mcag== X-Gm-Message-State: AGi0PuYo/M1Tf/CAp9rssxWTe70nAh+yjEZUUGvnMgOW7XTIag+OvJiP hSGueQJiG1AJtptos8chdRlcstZLQfg= X-Received: by 2002:a63:a61:: with SMTP id z33mr10826593pgk.440.1588847071729; Thu, 07 May 2020 03:24:31 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:a92f:c47d:76a8:b09e]) by smtp.gmail.com with ESMTPSA id 6sm4503318pfj.123.2020.05.07.03.24.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 03:24:31 -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 2/5] [media] mtk-mdp: handle vb2_dma_contig_set_max_seg_size errors during probe Date: Thu, 7 May 2020 20:23:44 +1000 Message-Id: <20200507202337.v3.2.If340fa06d86053aaea25841b36741fe69c3126dd@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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c index aeaed2cf4458..9b24b8d46eb7 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -193,7 +193,11 @@ static int mtk_mdp_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mdp); - vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) { + dev_err(&pdev->dev, "Failed to set vb2 dma mag seg size\n"); + goto err_m2m_register; + } pm_runtime_enable(dev); dev_dbg(dev, "mdp-%d registered successfully\n", mdp->id); -- 2.26.2.526.g744177e7f7-goog