Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp611969pxk; Wed, 2 Sep 2020 10:03:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyx//aMtQULDAZOxcwgZ90WYDQG4fLnwFJwNzvcKwZw2jjEC3EWfn3mnD2op6DP9dIYniQ0 X-Received: by 2002:a17:906:3816:: with SMTP id v22mr944393ejc.105.1599066214624; Wed, 02 Sep 2020 10:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599066214; cv=none; d=google.com; s=arc-20160816; b=KlHgm7Blp1Tf6xS0FcQha9/01pU0mlcf8l8eoOgUU5NupLs0JdNw8iaE3cWDgRB+rD JPuOq6YtI5LBFNxlAbVfw9tIb99FqQ2c30/J+6qjOaCHagFifhA36aVewCIIVYzQw9Id u9O3MTS1/THvcGpKZO/ml3BluFerW3f87q2G1YtcqCaeDd71D/CJ6mHScvcCQelDfckE OlbmHRi8ppySt2x4Bv9wpuaSUP84rF6oisHbFzHISkc3KJqdXKuXvJsCqJxKB5uYb6HB XpRpj2ls5HJxKEJBdCRAUwq1qIx3xE6ELswJrLAXhGIzs60uh3jqhO9TT/0Mz3kR4deX qbMQ== 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=PGH19IhlY3wzI+Xgt/jFHbPIkqhJBb7tq7WhHAYr9NE=; b=SJa9UXTlPhICENAquEpRzAIgX921BFVaOqSz0DNM0gjQ/YP4k1xHupD1e5Aac/6sqN 02wg9gvY4MFpsLcjau+xVRTkB7diaRskWyYLufcJny+iZiCWPFM84gS+p++u9X1b4WWU qzBn9YqvytMnKPcJKTjOeecBVZGbmXBqBboTrr7B57ud/npiq2/66EAXeUUPea+YYL4L /P0VOShNfDuczfJv+Yy/UIta1IIpjDxPMFDR9145S55gC12a50E957VEBPINiC71swC+ ENgCjM4qSR9EzfN3k0hXNK7z6+0RCmaHSj5Rwi/k5zXVzsRAhHkfoZZ1zYJOJ0+ffIhe +dkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N5so/Ky1"; 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 g15si3082466edp.25.2020.09.02.10.03.11; Wed, 02 Sep 2020 10:03:34 -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="N5so/Ky1"; 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 S1728576AbgIBQ7j (ORCPT + 99 others); Wed, 2 Sep 2020 12:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbgIBQ7H (ORCPT ); Wed, 2 Sep 2020 12:59:07 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94002C061245 for ; Wed, 2 Sep 2020 09:59:07 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 5so2842997pgl.4 for ; Wed, 02 Sep 2020 09:59:07 -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=PGH19IhlY3wzI+Xgt/jFHbPIkqhJBb7tq7WhHAYr9NE=; b=N5so/Ky16b2e29g8iaId2ApITYVADR1eFlQHSFvgrkpveRZ3Javht1yaDfC5rCqRkU DZhM0/9FEWl8zKvxNL717MNA66SfEDZRf4MAyFHa0sdtEd9tTx5reLGov0+Wvekr2FBG ayxZY09KBpe2z+1kdFFpSD3Wza6J5tpBY81erBr8FPF0uy29rm4ZzSPSd1J9ClEdGxzs DOwAkN28gkVtROzagPJqxl7maaWFD5DxZyDyCJTBU3/hg5GrIz9SoVi9aeVT5h+bkI0n 1MhtO0rFlvVMOPg+MUti/5EPp6paNK+RWt2Hf1iokCDaN2Mm1OxmLSe9JE7YB5p+qwOb 9RBQ== 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=PGH19IhlY3wzI+Xgt/jFHbPIkqhJBb7tq7WhHAYr9NE=; b=WpsQM+rZvolDLmrdQWaCHr5Cm0k7E57B3iHK3vR1S5c1IES0h2YskshBdLzt415ipe JD22hMACNKdVr814O6CEdqN2WRGWJQgqmGePZI/ofIb296EzyyXmilpaY9l22bcvssjM XK2SodZ8j97oz3U7hccClS2VXFxQBXJJMhSZPWAOjIKRBRQt+8ujDyDIwte4hKlL/fIZ U1z1c1k54iFIBmI7YvFQ4ozPr3Q39Fhy4Si9Uej7MnerWaNaN13+O1KFmBnZ7bAS0pzn sg0z14grfgKRa0IZ31aLcScaxlv37SrmXWhz5jFDBx/bHQBzax8s3eiLFssQhl7ndqEb sW0g== X-Gm-Message-State: AOAM5317Zugw9t/wUy6wCoWRnDGrSE3txuYG1RmJCh+PPLRRDKsRhbHY QZkdHzoeV1K0NgT1DoJ3k3RP8g== X-Received: by 2002:a63:31d2:: with SMTP id x201mr2678709pgx.263.1599065946942; Wed, 02 Sep 2020 09:59:06 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id mw8sm4848823pjb.47.2020.09.02.09.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 09:59:06 -0700 (PDT) Date: Wed, 2 Sep 2020 10:59:04 -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 -next] remoteproc: k3-dsp: Fix return value check in k3_dsp_rproc_of_get_memories() Message-ID: <20200902165904.GB280378@xps15> References: <20200902140614.28636-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200902140614.28636-1-yuehaibing@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2020 at 10:06:14PM +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: 87218f96c21a ("remoteproc: k3-dsp: Add support for C71x DSPs") > Signed-off-by: YueHaibing > --- > 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 -EBUSY; Shouldn't this be -ENOMEM? > } > kproc->mem[i].bus_addr = res->start; > kproc->mem[i].dev_addr = data->mems[i].dev_addr; > -- > 2.17.1 > >