Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp694370pxb; Tue, 5 Apr 2022 19:05:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv9FstPX/76EJX/xvEq9X3O1yhDsI7ZdEi/62+EZj4/iPke6ZROy0I7OAFG7x1s3YoOQpr X-Received: by 2002:a17:902:b183:b0:153:59db:f860 with SMTP id s3-20020a170902b18300b0015359dbf860mr6237962plr.19.1649210592325; Tue, 05 Apr 2022 19:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210592; cv=none; d=google.com; s=arc-20160816; b=wSvrCBa1tjvucyMezEFRzPLH0VmEwAKoxg6IKL9QBC2KXn/9m+H/mHI4tnXjz0oSeM T3fQM7CTOxe4R5S5YYRctZNXLBLshjum8ykwW2Cf+RtBCOlV6cfztHlBpVp0tflwlw0z U61FJ2as3KmbImwhjj3yozjYMNfPqPz7sqIThNA+7tpVG/s1Rkv1bqP8xOHg/l4EJfmQ JtekZeNDYL7RAKPT+8UljF1SX3S7Eh7zB/CJUQwOJNoXMZuEe6zx+Kws265ODYNGqiCd X859j+w7SV9XcruXA0px+mCgLypHVmoPy5/PNZxZGLcItQjF1K1yr6ICweeGDzFwrioX NgxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=015MuCRbcPE49k5kgSd0cQx+xwljKKpLw9+fKSF1Js0=; b=LFGV9kRqUkhUVJxIy2MGqFNoRUizpOtbvqZVYgkiuLm/4pYOHmaC7FZdjce0Q1fKDT i2xBdXCQ0k6cWDREE6XFqIZ4wXwJ+2//BuQRut2A6lQLgloRfYlEaYBft7drnHJ1JOX4 7VkhZerzPbRULgEzz5EKXJv7mCaIGKk1B5xpPpwBP1oZ3yYKNzbl77GgxiUjsS1ltaLV agGyiokSVC8d2eUBz9zgLTwIlPbupjj5SDoUjwGO5e9lqMyWlE4Yt+dyndhORWsn28P5 jcwR6KR5ReUrb+spneiYJ5M5wuY8FXD2V03q2m3YFqFCgrX8xuPVpDo7rOrahTEr6hao JBEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6K7aohJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k62-20020a17090a14c400b001c7469269b5si3473033pja.56.2022.04.05.19.02.54; Tue, 05 Apr 2022 19:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6K7aohJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382347AbiDEMOz (ORCPT + 99 others); Tue, 5 Apr 2022 08:14:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244776AbiDEIwi (ORCPT ); Tue, 5 Apr 2022 04:52:38 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17267BC4; Tue, 5 Apr 2022 01:43:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 79A41CE1C6C; Tue, 5 Apr 2022 08:43:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AA3BC385A0; Tue, 5 Apr 2022 08:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148218; bh=Ts1OsI3ZLCMyHQ1eqGV7NkwX+jLelzLpcnalARBhejs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6K7aohJJ4RgKNBpj4iZ/yaVmikftQPMzDsohmNDP4rO7zvwTswhfX5BwgSvk+pYw j6PrV2XuR/S5gtplyys2w5+R8ofGxo/rif7R7H8cOO/BxITHEXZFABrOGX2oRYahNE 8GsCkU4l7Fpflbl7xwLK2qVh6ENzxI4Kflxyd6F8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Corentin Labbe , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.16 0278/1017] media: staging: media: zoran: fix usage of vb2_dma_contig_set_max_seg_size Date: Tue, 5 Apr 2022 09:19:51 +0200 Message-Id: <20220405070402.519586275@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corentin Labbe [ Upstream commit 241f5b67fb48def58643f279dfb8468bdd54b443 ] vb2_dma_contig_set_max_seg_size need to have a size in parameter and not a DMA_BIT_MASK(). While fixing this issue, also fix error handling of all DMA size setting. Reported-by: kernel test robot Fixes: d4ae3689226e5 ("media: zoran: device support only 32bit DMA address") Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/zoran/zoran_card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c index f259585b0689..c578ef3c32f5 100644 --- a/drivers/staging/media/zoran/zoran_card.c +++ b/drivers/staging/media/zoran/zoran_card.c @@ -1069,8 +1069,10 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) - return -ENODEV; - vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + return err; + err = vb2_dma_contig_set_max_seg_size(&pdev->dev, U32_MAX); + if (err) + return err; nr = zoran_num++; if (nr >= BUZ_MAX) { -- 2.34.1