devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: crypto: omap-sham - Add code to use dmaengine API
@ 2013-11-06 16:17 Dan Carpenter
       [not found] ` <20131106161720.GL15603-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-06 16:17 UTC (permalink / raw)
  To: mgreer-luAo+O/VEmrlveNOaEYElw; +Cc: devicetree-u79uwXL29TY76Z2rM5mHXA

Hello Mark A. Greer,

This is a semi-automatic email about new static checker warnings.

The patch dfd061d5a8f5: "crypto: omap-sham - Add code to use 
dmaengine API" from Dec 21, 2012, leads to the following Smatch 
complaint:

drivers/crypto/omap-sham.c:1973 omap_sham_probe()
	 error: we previously assumed 'dd->dma_lch' could be null (see line 1934)

drivers/crypto/omap-sham.c
  1931  
  1932          dd->dma_lch = dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
  1933							       &dd->dma, dev, "rx");
  1934		if (!dd->dma_lch) {
                     ^^^^^^^^^^^
New check.

  1935			dd->polling_mode = 1;
  1936			dev_dbg(dev, "using polling mode instead of dma\n");
  1937		}
  1938	

[snip]

  1964	
  1965		return 0;
  1966	
  1967	err_algs:
  1968		for (i = dd->pdata->algs_info_size - 1; i >= 0; i--)
  1969			for (j = dd->pdata->algs_info[i].registered - 1; j >= 0; j--)
  1970				crypto_unregister_ahash(
  1971						&dd->pdata->algs_info[i].algs_list[j]);
  1972		pm_runtime_disable(dev);
  1973		dma_release_channel(dd->dma_lch);
                                    ^^^^^^^^^^^
New unchecked dereference.

  1974	data_err:
  1975		dev_err(dev, "initialization failed.\n");

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-07  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 16:17 crypto: omap-sham - Add code to use dmaengine API Dan Carpenter
     [not found] ` <20131106161720.GL15603-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-11-07  0:38   ` Mark A. Greer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).