devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: crypto: omap-sham - Add code to use dmaengine API
Date: Wed, 6 Nov 2013 19:17:20 +0300	[thread overview]
Message-ID: <20131106161720.GL15603@elgon.mountain> (raw)

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

             reply	other threads:[~2013-11-06 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 16:17 Dan Carpenter [this message]
     [not found] ` <20131106161720.GL15603-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-11-07  0:38   ` crypto: omap-sham - Add code to use dmaengine API Mark A. Greer

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=20131106161720.GL15603@elgon.mountain \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mgreer-luAo+O/VEmrlveNOaEYElw@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).