linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: bparrot@ti.com
Cc: linux-media@vger.kernel.org
Subject: re: [media] media: ti-vpe: Add CAL v4l2 camera capture driver
Date: Wed, 3 Feb 2016 08:00:13 +0300	[thread overview]
Message-ID: <20160203050013.GA29993@mwanda> (raw)

Hello Benoit Parrot,

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

The patch 343e89a792a5: "[media] media: ti-vpe: Add CAL v4l2 camera 
capture driver" from Jan 6, 2016, leads to the following Smatch 
complaint:

drivers/media/platform/ti-vpe/cal.c:1349 cal_start_streaming()
	 warn: variable dereferenced before check 'ctx->sensor' (see line 1332)

drivers/media/platform/ti-vpe/cal.c
  1331	
  1332		ret = cal_get_external_info(ctx);
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
Dereferenced inside function call.

  1333		if (ret < 0)
  1334			goto err;
  1335	
  1336		cal_runtime_get(ctx->dev);
  1337	
  1338		enable_irqs(ctx);
  1339		camerarx_phy_enable(ctx);
  1340		csi2_init(ctx);
  1341		csi2_phy_config(ctx);
  1342		csi2_lane_config(ctx);
  1343		csi2_ctx_config(ctx);
  1344		pix_proc_config(ctx);
  1345		cal_wr_dma_config(ctx, ctx->v_fmt.fmt.pix.bytesperline);
  1346		cal_wr_dma_addr(ctx, addr);
  1347		csi2_ppi_enable(ctx);
  1348	
  1349		if (ctx->sensor) {
                    ^^^^^^^^^^^
Checked too late.

  1350			if (v4l2_subdev_call(ctx->sensor, video, s_stream, 1)) {
  1351				ctx_err(ctx, "stream on failed in subdev\n");

regards,
dan carpenter

             reply	other threads:[~2016-02-03  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  5:00 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-03  4:53 [media] media: ti-vpe: Add CAL v4l2 camera capture driver Dan Carpenter

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=20160203050013.GA29993@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=bparrot@ti.com \
    --cc=linux-media@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;
as well as URLs for NNTP newsgroup(s).