linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Thierry Reding <treding@nvidia.com>
Cc: oe-kbuild@lists.linux.dev,
	"Christian König" <christian.koenig@amd.com>,
	lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	"Linux Memory Management List" <linux-mm@kvack.org>
Subject: Re: [linux-next:master 8309/10976] drivers/gpu/host1x/context.c:82 host1x_memory_context_list_init() warn: missing error code 'err'
Date: Thu, 13 Apr 2023 12:05:15 +0300	[thread overview]
Message-ID: <70bab86b-d705-4815-8100-3cce0cbf25e8@kili.mountain> (raw)
In-Reply-To: <ZDfEEOEoMA55t4ol@orome>

On Thu, Apr 13, 2023 at 10:57:52AM +0200, Thierry Reding wrote:
> On Thu, Apr 13, 2023 at 08:06:08AM +0300, Dan Carpenter wrote:
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  69  
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  70  		err = of_dma_configure_id(&ctx->dev, node, true, &i);
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  71  		if (err) {
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  72  			dev_err(host1x->dev, "IOMMU configuration failed for context device %d: %d\n",
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  73  				i, err);
> > 55879dad0f3ae8 Yang Yingliang  2022-11-26  74  			device_unregister(&ctx->dev);
> > 55879dad0f3ae8 Yang Yingliang  2022-11-26  75  			goto unreg_devices;
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  76  		}
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  77  
> > 9026ba722360ce Thierry Reding  2022-11-17  78  		if (!tegra_dev_iommu_get_stream_id(&ctx->dev, &ctx->stream_id) ||
> > 9026ba722360ce Thierry Reding  2022-11-17  79  		    !device_iommu_mapped(&ctx->dev)) {
> > 8aa5bcb6161206 Mikko Perttunen 2022-06-27  80  			dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i);
> > 55879dad0f3ae8 Yang Yingliang  2022-11-26  81  			device_unregister(&ctx->dev);
> > 55879dad0f3ae8 Yang Yingliang  2022-11-26 @82  			goto unreg_devices;
> > 
> > error code?
> 
> We don't actually want this to be a fatal failure, so err = 0 is what we
> want here. Should we set err = 0 explicitly here to appease smatch?

Yes, please.

regards,
dan carpenter



  reply	other threads:[~2023-04-13  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ac98d66d-8735-4963-8cdb-be891d134cb3@kili.mountain>
2023-04-13  8:57 ` Thierry Reding
2023-04-13  9:05   ` Dan Carpenter [this message]
2023-04-13  9:20     ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70bab86b-d705-4815-8100-3cce0cbf25e8@kili.mountain \
    --to=error27@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox