From patchwork Wed May 6 05:49:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eizan Miyamoto X-Patchwork-Id: 11530263 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0472D14C0 for ; Wed, 6 May 2020 05:50:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0936206F9 for ; Wed, 6 May 2020 05:50:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kEaYobg1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ej7fOABB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0936206F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M/yLNpxwXg8yfW0uXNcyPoxCL0wVZUvA8gA8Gd50wqo=; b=kEaYobg1wL5NFR XB/xbC6NGJ4jzsiQ/H+19LV7y7CfF6nrnQURTQoepLd0D8osOjYaDwRNJjIut+3rt7UBmK58zaUM7 CEeMHqph6t1lSN4JCvTL3ocLV9KcQPsJ3QcZXKVzgCdw4RCbElia9HmzrD4HR9u92ze6dWi0/w86K d/U2DJ5SOTy227PEm06S71s4BhE3uYWyB1lizieVmPA3wwBqjo+ptaOivyaq7sLOH7H22ALPWG8Mo sHfZNjRQVlmg/KTa+oe5FUzX/VYwQikZYlGZ30LUVtNfxhUYqR57ckh/GNRT+Meto2WzVlldoI2LN JdqUSaRajVuJryiOpMUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWCxB-0007Ye-9P; Wed, 06 May 2020 05:50:45 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWCwn-000790-PJ for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 05:50:23 +0000 Received: by mail-pf1-x441.google.com with SMTP id z1so470298pfn.3 for ; Tue, 05 May 2020 22:50:21 -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=POceMM7hG1Wtztbcwf3G6dremJIzPAmuZKv3zO2DdE0=; b=Ej7fOABBLfr1SN0apV87KeMrwvbvxDU3i1UCROPXswmo0RGviza3edMx/g/ub/mlAC 6gOfyEncqNbhatR7uPY4Kb7OwU8Zwz7gAo4mNkPj8DQ0s+PW5zKLJGuglOQOv971ivPm cm6gxqpNX715Mxq650ozR+wi9DzQEuEU2gZ9Y= 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=POceMM7hG1Wtztbcwf3G6dremJIzPAmuZKv3zO2DdE0=; b=qW2+EIEIqB9D2l2dlFIeoZuC6F/hqgZ8ZwGIPGPOlrT4y8PZjx68lNqpOFWOdV2dUc Fp2dnbtv1SfSOysTrraeKBNuRgsISa6UyNu7FBHsKT0+r3Xz9qdIueEiIRtrkMH3h6XF lICH1v8lFvcgoHNPej5VvnT21IyS8ssZjukvnFT4S/It7lefQ1CwiRi89OPHbiUMPm+Y 1HQ9eQ0vFGgCu09/CKXMECyTBXEqE/75TVzgb4ghYbEjM5X8kliTxjCLlyuACF+GnQaM IBpBhUZ2ZltU12R+ovz29FZ3DXTXapogTawVFgGsp3HE3wrV/SF4NBZdxin974QgexfD s8eQ== X-Gm-Message-State: AGi0PuZ+VlMO9KW3XgtbjL9CX+7onIo7/0GdNjuoE9IcoDfu8wrH4QBP LPaeShjDS4JLMHxzPoyVbmsxCg== X-Google-Smtp-Source: APiQypLs34OzIA/qNT4zrjxM2MJ+J7wyvZaKQQqG+9wBc94UWI+Z0oBDVEUVVCUVLxdScKVA338gbg== X-Received: by 2002:a62:ae13:: with SMTP id q19mr6772243pff.310.1588744220983; Tue, 05 May 2020 22:50:20 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:a92f:c47d:76a8:b09e]) by smtp.gmail.com with ESMTPSA id f30sm3870470pje.29.2020.05.05.22.50.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 May 2020 22:50:20 -0700 (PDT) From: Eizan Miyamoto To: LKML Subject: [PATCH v2 2/5] [media] mtk-mdp: handle vb2_dma_contig_set_max_seg_size errors during probe Date: Wed, 6 May 2020 15:49:17 +1000 Message-Id: <20200506154832.v2.2.If340fa06d86053aaea25841b36741fe69c3126dd@changeid> X-Mailer: git-send-email 2.26.2.526.g744177e7f7-goog In-Reply-To: <20200506054920.109738-1-eizan@chromium.org> References: <20200506054920.109738-1-eizan@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200505_225021_824082_BC2DD6AA X-CRM114-Status: GOOD ( 12.46 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Minghsiu Tsai , Houlong Wei , Eizan Miyamoto , linux-mediatek@lists.infradead.org, Matthias Brugger , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This is a cleanup to better handle errors during MDP probe. Signed-off-by: eizan@chromium.org Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra --- Changes in v1: - 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);