linux_dsm_epyc7002/drivers/media
Peter Senna Tschudin cab3e1ffbe [media] cx25821: Cleanup filename assignment code
I'm pasting the original code and my proposal on the commit message for
make it easy to compare the two versions.
Line 62 of cx25821-audio-upstream.h contains:
char *_defaultAudioName = "/root/audioGOOD.wav";
Original code after replace kmemdup for kstrdup, and after fix return error
code:
if (dev->input_audiofilename) {
	dev->_audiofilename = kstrdup(dev->input_audiofilename,
				      GFP_KERNEL);
	if (!dev->_audiofilename) {
		err = -ENOMEM;
		goto error;
	}
	/* Default if filename is empty string */
	if (strcmp(dev->input_audiofilename, "") == 0)
		dev->_audiofilename = "/root/audioGOOD.wav";
} else {
	dev->_audiofilename = kstrdup(_defaultAudioName,
				      GFP_KERNEL);
	if (!dev->_audiofilename) {
		err = -ENOMEM;
		goto error;
	}
}
Code proposed in this patch:
if ((dev->input_audiofilename) &&
    (strcmp(dev->input_audiofilename, "") != 0))
	dev->_audiofilename = kstrdup(dev->input_audiofilename,
				      GFP_KERNEL);
else
	dev->_audiofilename = kstrdup(_defaultAudioName,
				      GFP_KERNEL);
if (!dev->_audiofilename) {
	err = -ENOMEM;
	goto error;
}

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 20:37:09 -03:00
..
common [media] siano: Remove redundant NULL check before kfree 2013-03-18 17:03:41 -03:00
dvb-core [media] dvb_frontend: Simplify the emulation logic 2013-03-18 20:33:03 -03:00
dvb-frontends [media] stv090x: do not unlock unheld mutex in stv090x_sleep() 2013-03-14 11:40:32 -03:00
firewire [media] remove include/linux/dvb/dmx.h 2012-10-19 07:29:17 -03:00
i2c [media] Media: remove incorrect __init/__exit markups 2013-03-18 16:59:59 -03:00
mmc Drivers: media: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
parport [media] bw-qcam: remove unnecessary qc_reset and qc_setscanmode calls 2013-02-05 18:20:38 -02:00
pci [media] cx25821: Cleanup filename assignment code 2013-03-18 20:37:09 -03:00
platform [media] media/v4l2: VIDEOBUF2_DMA_CONTIG should depend on HAS_DMA 2013-03-18 18:03:18 -03:00
radio [media] Media: remove incorrect __init/__exit markups 2013-03-18 16:59:59 -03:00
rc [media] Media: remove incorrect __init/__exit markups 2013-03-18 16:59:59 -03:00
tuners [media] media: tuners: Remove redundant NULL check before kfree 2013-03-18 17:04:55 -03:00
usb [media] em28xx-i2c: relax error check in em28xx_i2c_recv_bytes() 2013-03-18 20:18:29 -03:00
v4l2-core [media] media/v4l2: VIDEOBUF2_DMA_CONTIG should depend on HAS_DMA 2013-03-18 18:03:18 -03:00
Kconfig Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-02-24 17:35:10 -08:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c [media] media: fix MEDIA_IOC_DEVICE_INFO return code 2012-08-12 07:57:57 -03:00
media-devnode.c [media] media-devnode: Replace printk with pr_* 2012-09-27 14:19:23 -03:00
media-entity.c [media] media: Add link_validate() op to check links to the sink pad 2012-05-14 08:44:11 -03:00