Fix several smatch warnings. There are only 26 smatch warnings now:
drivers/media/pci/cx23885/cx23885-dvb.c:2046 dvb_register() Function too hairy. Giving up. This is actually a memory allocation limit of 50MB at smatch. I sent a patch changing such limit to 200MB to Dan. drivers/media/dvb-frontends/stv0900_core.c:1183 stv0900_get_optim_carr_loop() error: buffer overflow 'cllas2' 11 <= 13 drivers/media/dvb-frontends/stv0900_core.c:1185 stv0900_get_optim_carr_loop() error: buffer overflow 'cllas2' 11 <= 13 drivers/media/dvb-frontends/stv0900_core.c:1187 stv0900_get_optim_carr_loop() error: buffer overflow 'cllas2' 11 <= 13 drivers/media/dvb-frontends/stv0900_core.c:1189 stv0900_get_optim_carr_loop() error: buffer overflow 'cllas2' 11 <= 13 drivers/media/dvb-frontends/stv0900_core.c:1191 stv0900_get_optim_carr_loop() error: buffer overflow 'cllas2' 11 <= 13 drivers/media/media-entity.c:238:17: warning: Variable length array is used. drivers/media/media-entity.c:239:17: warning: Variable length array is used. drivers/media/pci/ttpci/av7110.c:2210 frontend_init() warn: missing break? reassigning 'av7110->fe' drivers/media/pci/ttpci/budget.c:631 frontend_init() warn: missing break? reassigning 'budget->dvb_frontend' drivers/media/platform/vivid/vivid-rds-gen.c:82 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 43 drivers/media/platform/vivid/vivid-rds-gen.c:83 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 42 drivers/media/platform/vivid/vivid-rds-gen.c:89 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 84 drivers/media/platform/vivid/vivid-rds-gen.c:90 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 85 drivers/media/platform/vivid/vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 86 drivers/media/platform/vivid/vivid-rds-gen.c:93 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 87 drivers/media/radio/radio-aimslab.c:73 rtrack_alloc() warn: possible memory leak of 'rt' drivers/media/radio/radio-aztech.c:87 aztech_alloc() warn: possible memory leak of 'az' drivers/media/radio/radio-gemtek.c:189 gemtek_alloc() warn: possible memory leak of 'gt' drivers/media/radio/radio-trust.c:60 trust_alloc() warn: possible memory leak of 'tr' drivers/media/radio/radio-typhoon.c:79 typhoon_alloc() warn: possible memory leak of 'ty' drivers/media/radio/radio-zoltrix.c:83 zoltrix_alloc() warn: possible memory leak of 'zol' drivers/media/usb/pvrusb2/pvrusb2-encoder.c:227 pvr2_encoder_cmd() error: buffer overflow 'wrData' 16 <= 16 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648) drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649) Those seem to be false positives that would require a bigger logic change (or some change at smatch side). Probably not worth to touch the driver code. drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we previously assumed 'steal' could be null (see line 138) I suspect that this is a real bug and should be addressed. Fixing it would require some tests with the hardware, and a better understanding on what the function should be expecting to do when "steal" is NULL. Mauro Carvalho Chehab (11): [media] drxk: better handle errors [media] em28xx: remove dead code [media] sh_vou: avoid going past arrays [media] dib0090: Remove a dead code [media] bt8xx: remove needless check [media] ivtv: fix two smatch warnings [media] tm6000: remove needless check [media] ir: Fix IR_MAX_DURATION enforcement [media] rc: set IR_MAX_DURATION to 500 ms [media] usbvision: cleanup the code [media] lirc_imon: simplify error handling code drivers/media/dvb-frontends/dib0090.c | 4 +- drivers/media/dvb-frontends/drxk_hard.c | 7 +- drivers/media/pci/bt8xx/dst_ca.c | 132 +++++++++++++------------- drivers/media/pci/ivtv/ivtv-driver.h | 3 +- drivers/media/platform/sh_vou.c | 14 +-- drivers/media/rc/redrat3.c | 5 +- drivers/media/rc/streamzap.c | 6 +- drivers/media/usb/em28xx/em28xx-video.c | 1 - drivers/media/usb/tm6000/tm6000-video.c | 2 +- drivers/media/usb/usbvision/usbvision-video.c | 17 +++- drivers/staging/media/lirc/lirc_imon.c | 95 ++++++++---------- include/media/rc-core.h | 2 +- 12 files changed, 139 insertions(+), 149 deletions(-) -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html