Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1336728pxk; Thu, 10 Sep 2020 12:52:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUnJFulYToswtHIuj3H9fxBIP0BscBqh4VNMg8H/RBC35Ln+e7XHMQ2H503dzaI71DaBMp X-Received: by 2002:a17:906:a845:: with SMTP id dx5mr10329967ejb.543.1599767531119; Thu, 10 Sep 2020 12:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599767531; cv=none; d=google.com; s=arc-20160816; b=e218uv+0DwIlbJtxdPSdIGnBooB4WL122tytfaL/ukSVm9HpYnAl8seI9l/+J03f5F mDuF5ZukutQNHL20KWEzTO/8kTfQPHHDgqnKQJ/vWthRbk+9QqXyYSHB9GVs+nyNtWGx MlAbmGIWFZtLQLPtRnvKN8X6iMQ8Y7VrQBaWBmRUGjU8+SXTkjPbaF5JA0/VVip5sTS5 tzjha/wIvEZ4ujvcXNw6Si42LClDlaWj7Cp/ei1DbSvyxFBUcoziYmBL32qTXHpVxFAz Y3HiSOAJSy5RxNVz9vVdwlGewKqyAJ9fnAXJutrgxevUaTCO3pmxUecCvtyVVmCttFJy d2Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xDChIkAtb5Vukpnd8bJJRVf7fU2a+5XPgWV5S0nOt9o=; b=a125WNS0iU3FCV4yyQtUvZQb+oke1TpjHA5OVgIFKuGmaNm1+yOmQ2KmTqDD3Y/wmA /+R2/rJUMdPE3SIHQVGWdXpkzBM6SmmOJHY/y4e0B5rD/2Z7NJ8V79l+u99qrm40bxwS NfpM8zKR/J7xPYC3lQPYXM4kRQS939qXiO9SmMPtWFNb3sAwWkgf0cL6fyrLRPmc0/3S Wpug2cQ3NIqHVDSRdf2h1AG44NfHEGdCsFR6glfgXVPxe1T92ui2MjUmwq+9yOxiw6zN G9wECcB1QiMczQrEAHej32FKWgj9dANeyKL1FRhdjCEwa6eODTKXb/buibaCnUbNHPik ueXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GMLrSwZm; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si4388574edy.380.2020.09.10.12.51.48; Thu, 10 Sep 2020 12:52:11 -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=@linaro.org header.s=google header.b=GMLrSwZm; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726776AbgIJTvO (ORCPT + 99 others); Thu, 10 Sep 2020 15:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgIJTuh (ORCPT ); Thu, 10 Sep 2020 15:50:37 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 357FEC0613ED for ; Thu, 10 Sep 2020 12:50:37 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id fa1so548121pjb.0 for ; Thu, 10 Sep 2020 12:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xDChIkAtb5Vukpnd8bJJRVf7fU2a+5XPgWV5S0nOt9o=; b=GMLrSwZmHtAb7ckfKa7u7eqxr83FkDC1sG/gpb2HdAJ7QRD+yEt9AnrvUNRzaA9mSr rsYXudCO+sEnI8MY+QRb6e87ZPH+k/EEssmqkNN8/ygzCn3nP/vi9P1wq+GB8iTl1O2L xC/Nw1N4lLEdzCrTp+NZlBoguH2YonWZ+IwFSNlsXftiiq5/taPI3Yt9lfVYQywDGeFX mQ8O9oLnHNJYcZaBpkb8+vndfLA7l4vpU4JTwhRa4k416jxLFL/qLesQLk0yDrkGfoVj ctC/y+9Mo5VSiBvA9NDfWwnfAGhZmq+16PQG9a0IUTCptP+a+bWvtyH/iTJYlnJf4nX0 qNWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xDChIkAtb5Vukpnd8bJJRVf7fU2a+5XPgWV5S0nOt9o=; b=L6425zMmpOUhkM0TimoGShivA+6l++l1b7iYQtNFg0fIiIt6DsP/0KPk3AQvtly+Ph BZ7fGYTPlXhmtt++mAAlKaD1U4T2EN3G3/YQ75pYKAoNmMbc5nCt/PuyIO36K+JyVxBW FsQHulc8ndUDD+w5I31K3Zh/nY7O5uwu7M0qe+jbC8CDMJsombsp9s69sTLCZar9F3rN gQMpWOsyKMXIvsoT3n5IT7IfIq2NzSBwV5dI/55Ma6Ww5CoVoR/gNgDPNpn9gh2WKEMZ tZy/4rPOCugknyhtY9gfXJJJ0vvezqdxVLku1g8k4VSZycpagSQo+sQBo+6EOJzVaQNr ZLuA== X-Gm-Message-State: AOAM532sdppgck8lIxLAirdSCtYw7Cg9VkekvXnlGDJ1AubAcq3vg9KC zCMZ4esT0uABfjjdUFkTQAQ/fQ== X-Received: by 2002:a17:90a:2ec8:: with SMTP id h8mr1482436pjs.173.1599767436537; Thu, 10 Sep 2020 12:50:36 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l1sm6732257pfc.164.2020.09.10.12.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 12:50:36 -0700 (PDT) Date: Thu, 10 Sep 2020 13:50:34 -0600 From: Mathieu Poirier To: YueHaibing Cc: ohad@wizery.com, bjorn.andersson@linaro.org, s-anna@ti.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 -next] remoteproc: k3-dsp: Fix return value check in k3_dsp_rproc_of_get_memories() Message-ID: <20200910195034.GA586100@xps15> References: <20200902140614.28636-1-yuehaibing@huawei.com> <20200905122503.17352-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200905122503.17352-1-yuehaibing@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 08:25:03PM +0800, YueHaibing wrote: > In case of error, the function devm_ioremap_wc() returns NULL pointer > not ERR_PTR(). The IS_ERR() test in the return value check should be > replaced with NULL test. > > Fixes: 6edbe024ba17 ("remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs") > Signed-off-by: YueHaibing > Acked-by: Suman Anna Reviewed-by: Mathieu Poirier > --- > v2: return ENOMEM instead of EBUSY, use corret Fixes tag > --- > drivers/remoteproc/ti_k3_dsp_remoteproc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c > index 9011e477290c..f373df35d7d0 100644 > --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c > +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c > @@ -445,10 +445,10 @@ static int k3_dsp_rproc_of_get_memories(struct platform_device *pdev, > > kproc->mem[i].cpu_addr = devm_ioremap_wc(dev, res->start, > resource_size(res)); > - if (IS_ERR(kproc->mem[i].cpu_addr)) { > + if (!kproc->mem[i].cpu_addr) { > dev_err(dev, "failed to map %s memory\n", > data->mems[i].name); > - return PTR_ERR(kproc->mem[i].cpu_addr); > + return -ENOMEM; > } > kproc->mem[i].bus_addr = res->start; > kproc->mem[i].dev_addr = data->mems[i].dev_addr; > -- > 2.17.1 > >