linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: sylvester.nawrocki@gmail.com, linux-media@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
Date: Sun, 25 Aug 2013 14:23:18 +0200	[thread overview]
Message-ID: <5219F736.2010706@gmail.com> (raw)
In-Reply-To: <20130823094647.GO31293@elgon.mountain>

On 08/23/2013 11:46 AM, Dan Carpenter wrote:
> [ Going through some old warnings... ]
>
> Hello Sylwester Nawrocki,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch babde1c243b2: "[media] V4L: Add driver for S3C24XX/S3C64XX
> SoC series camera interface" from Aug 22, 2012, leads to the
> following Smatch complaint:
>
> drivers/media/platform/s3c-camif/camif-capture.c:463 queue_setup()
> 	 warn: variable dereferenced before check 'fmt' (see line 460)
>
> drivers/media/platform/s3c-camif/camif-capture.c
>     455          if (pfmt) {
>     456                  pix =&pfmt->fmt.pix;
>     457                  fmt = s3c_camif_find_format(vp,&pix->pixelformat, -1);
>     458                  size = (pix->width * pix->height * fmt->depth) / 8;
>                                                             ^^^^^^^^^^
> Dereference.
>
>     459		} else {
>     460			size = (frame->f_width * frame->f_height * fmt->depth) / 8;
>                                                                     ^^^^^^^^^^
> Dereference.
>
>     461		}
>     462	
>     463		if (fmt == NULL)
>                      ^^^^^^^^^^^
> Check.

Thanks for the bug report. This check of course should be before line 455.
Would you like to sent a patch for this or should I handle that ?

--
Regards,
Sylwester



  reply	other threads:[~2013-08-25 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  9:46 [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface Dan Carpenter
2013-08-25 12:23 ` Sylwester Nawrocki [this message]
2013-08-27 14:19   ` Dan Carpenter
2013-08-27 14:26     ` Sylwester Nawrocki
2014-04-04 11:27       ` 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=5219F736.2010706@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@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).