* re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
@ 2013-08-23 9:46 Dan Carpenter
2013-08-25 12:23 ` Sylwester Nawrocki
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2013-08-23 9:46 UTC (permalink / raw)
To: sylvester.nawrocki; +Cc: linux-media, linux-samsung-soc
[ 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.
464 return -EINVAL;
465 *num_planes = 1;
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
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
2013-08-27 14:19 ` Dan Carpenter
0 siblings, 1 reply; 5+ messages in thread
From: Sylwester Nawrocki @ 2013-08-25 12:23 UTC (permalink / raw)
To: Dan Carpenter; +Cc: sylvester.nawrocki, linux-media, linux-samsung-soc
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
2013-08-25 12:23 ` Sylwester Nawrocki
@ 2013-08-27 14:19 ` Dan Carpenter
2013-08-27 14:26 ` Sylwester Nawrocki
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2013-08-27 14:19 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: linux-media, linux-samsung-soc
On Sun, Aug 25, 2013 at 02:23:18PM +0200, Sylwester Nawrocki wrote:
> 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 ?
Could you handle it and give me the Reported-by tag?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
2013-08-27 14:19 ` Dan Carpenter
@ 2013-08-27 14:26 ` Sylwester Nawrocki
2014-04-04 11:27 ` Dan Carpenter
0 siblings, 1 reply; 5+ messages in thread
From: Sylwester Nawrocki @ 2013-08-27 14:26 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Sylwester Nawrocki, linux-media, linux-samsung-soc
On 08/27/2013 04:19 PM, Dan Carpenter wrote:
> On Sun, Aug 25, 2013 at 02:23:18PM +0200, Sylwester Nawrocki wrote:
>> 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 ?
>
> Could you handle it and give me the Reported-by tag?
Sure, will do.
--
Regards,
Sylwester
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
2013-08-27 14:26 ` Sylwester Nawrocki
@ 2014-04-04 11:27 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-04-04 11:27 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: Sylwester Nawrocki, linux-media, linux-samsung-soc
Whatever happened with this btw? Also are you sure we don't need a
second check after line 457?
regards,
dan carpenter
On Tue, Aug 27, 2013 at 04:26:07PM +0200, Sylwester Nawrocki wrote:
> On 08/27/2013 04:19 PM, Dan Carpenter wrote:
> > On Sun, Aug 25, 2013 at 02:23:18PM +0200, Sylwester Nawrocki wrote:
> >> 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 ?
> >
> > Could you handle it and give me the Reported-by tag?
>
> Sure, will do.
>
> --
> Regards,
> Sylwester
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-04 11:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-08-27 14:19 ` Dan Carpenter
2013-08-27 14:26 ` Sylwester Nawrocki
2014-04-04 11:27 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.