public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: mfd: add driver for sequencer serial port
Date: Wed, 06 Nov 2013 16:11:24 +0000	[thread overview]
Message-ID: <20131106161124.GA15603@elgon.mountain> (raw)

Hello Cyril Chemparathy,

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

The patch 03df0f629483: "mfd: add driver for sequencer serial port" 
from Jan 18, 2011, leads to the following Smatch complaint:

drivers/mfd/ti-ssp.c:407 ti_ssp_probe()
	 error: we previously assumed 'pdata' could be null (see line 400)

drivers/mfd/ti-ssp.c
   399		sysclk = clk_get_rate(ssp->clk);
   400		if (pdata && pdata->out_clock)
                    ^^^^^
Check.

   401			prediv = (sysclk / pdata->out_clock) - 1;
   402		prediv = clamp(prediv, 0, 0xff);
   403		ssp_rmw(ssp, REG_PREDIV, 0xff, prediv);
   404	
   405		memset(cells, 0, sizeof(cells));
   406		for (id = 0; id < 2; id++) {
   407			const struct ti_ssp_dev_data *data = &pdata->dev_data[id];
                                                              ^^^^^^^^^^^^^^^^^^^
Unchecked dereference.

   408	
   409			cells[id].id		= id;

regards,
dan carpenter

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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20131106161124.GA15603@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.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