Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp211943rwe; Fri, 26 Aug 2022 03:48:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4aPR3e8CeYhn/SHdnLvZaaTD5QEUhCJJ4ThX3/Gc6RLVWK/IlclTF7bQsBYIdW7q4LfKZK X-Received: by 2002:a05:6402:4441:b0:43d:5bcf:afa0 with SMTP id o1-20020a056402444100b0043d5bcfafa0mr6163066edb.91.1661510899839; Fri, 26 Aug 2022 03:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661510899; cv=none; d=google.com; s=arc-20160816; b=GtniGvn9VeJGDwbyPIJNomtiABUo4K5OJBW/3E1rhDpsCH7F8tr7Eq+YeyaOAsZe0z CCEhrM76E1Oip7GXTjfbR1vYpXn1dJq2riWbsnBzx+XiHjjFjw7nyy/dqJ4una8ipyHI /yvAhtZK27JDtjCuZLSaxkeRxo82SAjRPadQvjKmdsZ0ZyL7iaVko8NO9YAXL1xsjhzb WPhO3YR6ElCIb3nf7ezoq39bgm+D0YpttpdTN3FE0+je4CvQVfZE3lqT0uCkne+D+trh 9lYIEFBntsgCnANnLk7hSmK8xU2W1PjvuALjjOG/81yBcNH5uByQFKYd7Kh6GOaJylRa krog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=5u0zs6xS+otSUFleoEn1GbSNDyvg608p+u3y21rmInc=; b=AKxKCh5YOzM7te8Z2cCDBgTusCBnBqF8bLyu55idUTG3zbfHm4zBvButT9jA8Dmuo7 BHnQdjJTPoBurFNVJMXvH/Rjdh+uzF7AX/2vbclMrRzeI70dRksS5iJKi8E7dlozVBQP VkapbhraEWg7Oroad209sz3xmzqSxWb+pt2rypxobAEsjzvrvCOl63ozwlwJJmZkvVt+ 7SbYKTFMuqazGKqdOG61oGx9lCKsCsmlxleC80n54musSNPzaW0aDFAE4WI/8Ms7Le5x Xcby25uJ5cnQCZX8EBdRpDWWkKfn7gMpsrMmWtCIzwXs5xqm/R/4WdTapVULkzc1vOrJ 5RVw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr2-20020a170906d54200b006feb890dc1asi1306859ejc.886.2022.08.26.03.47.51; Fri, 26 Aug 2022 03:48:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245494AbiHZKbV (ORCPT + 99 others); Fri, 26 Aug 2022 06:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230167AbiHZKbS (ORCPT ); Fri, 26 Aug 2022 06:31:18 -0400 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4BBD276A for ; Fri, 26 Aug 2022 03:31:17 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id RWcNoqoK9BDYDRWcNop5xv; Fri, 26 Aug 2022 12:31:15 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 26 Aug 2022 12:31:15 +0200 X-ME-IP: 90.11.190.129 Message-ID: <50bfdb3f-f6fe-b0ef-4214-5d533d45e89c@wanadoo.fr> Date: Fri, 26 Aug 2022 12:31:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] intel_th: Fix dma_map_sg error check Content-Language: fr To: Jack Wang , alexander.shishkin@linux.intel.com Cc: linux-kernel@vger.kernel.org References: <20220826101523.79502-1-jinpu.wang@ionos.com> From: Christophe JAILLET In-Reply-To: <20220826101523.79502-1-jinpu.wang@ionos.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 Le 26/08/2022 à 12:15, Jack Wang a écrit : > dma_map_sg return 0 on error. > > Cc: Alexander Shishkin > Cc: linux-kernel@vger.kernel.org > Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") > Signed-off-by: Jack Wang > --- > drivers/hwtracing/intel_th/msu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c > index 6c8215a47a60..b49237d56a60 100644 > --- a/drivers/hwtracing/intel_th/msu.c > +++ b/drivers/hwtracing/intel_th/msu.c > @@ -931,7 +931,7 @@ static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size) > > ret = dma_map_sg(msc_dev(msc)->parent->parent, msc->single_sgt.sgl, 1, > DMA_FROM_DEVICE); > - if (ret < 0) > + if (!ret) Missing ret = -EIO? like in other patches? CJ > goto err_free_pages; > > msc->nr_pages = nr_pages;