public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* re: [media] lmedm04: fix build
@ 2012-08-13 16:58 Dan Carpenter
  2012-08-13 18:42 ` [PATCH] " Malcolm Priestley
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-08-13 16:58 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media

Hello Mauro Carvalho Chehab,

The patch db6651a9ebb3: "[media] lmedm04: fix build" from Aug 12, 
2012, leads to the following warning:
drivers/media/dvb/dvb-usb-v2/lmedm04.c:769 lme2510_download_firmware()
	 error: usb_control_msg() 'data' too small (128 vs 265)

   737          data = kzalloc(128, GFP_KERNEL);
                               ^^^
data is 128 bytes.

   738          if (!data) {
   739                  info("FRM Could not start Firmware Download"\
   740                          "(Buffer allocation failed)");
   741                  return -ENOMEM;
   742          }
   743  

[snip]

   768  
   769          usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0),
   770                          0x06, 0x80, 0x0200, 0x00, data, 0x0109, 1000);
                                                                ^^^^^^

Smatch expects this parameter to equal to sizeof(data) or smaller
instead of 265.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-13 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13 16:58 [media] lmedm04: fix build Dan Carpenter
2012-08-13 18:42 ` [PATCH] " Malcolm Priestley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox