android_kernel_motorola_sm6225/drivers/media/pci/cx25821
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
..
cx25821-alsa.c
cx25821-audio-upstream.c [media] cx25821: Cleanup filename assignment code 2013-03-18 20:37:09 -03:00
cx25821-audio-upstream.h
cx25821-audio.h
cx25821-biffuncs.h [media] cx25821: get rid of warning: no previous prototype 2012-10-27 18:02:07 -02:00
cx25821-cards.c
cx25821-core.c Drivers: media: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
cx25821-gpio.c
cx25821-i2c.c [media] cx25821: get rid of warning: no previous prototype 2012-10-27 18:02:07 -02:00
cx25821-medusa-defines.h
cx25821-medusa-reg.h
cx25821-medusa-video.c
cx25821-medusa-video.h
cx25821-reg.h
cx25821-sram.h
cx25821-video-upstream-ch2.c [media] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return code 2012-11-22 15:39:11 -02:00
cx25821-video-upstream-ch2.h
cx25821-video-upstream.c [media] drivers/media/pci/cx25821/cx25821-video-upstream.c: fix error return code 2012-11-22 14:20:22 -02:00
cx25821-video-upstream.h
cx25821-video.c [media] v4l: Convert drivers to use monotonic timestamps 2012-12-21 10:56:43 -02:00
cx25821-video.h [media] v4l2: make vidioc_s_crop const 2012-09-26 11:02:25 -03:00
cx25821.h
Kconfig drivers/media/video/cx25821: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:06 -08:00
Makefile [media] btcx-risc: move from media/i2c to media/common 2013-02-08 16:11:25 -02:00