Re: [linux-next:master 8309/10976] drivers/gpu/host1x/context.c:82 host1x_memory_context_list_init() warn: missing error code 'err'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux