mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
[media] cx25821: Replace kmemdup for kstrdup and clean up
Replace kmemdup for kstrdup and cleanup related code. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
c81d497284
commit
6c17c24d38
@ -701,7 +701,6 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
|
|||||||
{
|
{
|
||||||
struct sram_channel *sram_ch;
|
struct sram_channel *sram_ch;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
int str_length = 0;
|
|
||||||
|
|
||||||
if (dev->_audio_is_running) {
|
if (dev->_audio_is_running) {
|
||||||
pr_warn("Audio Channel is still running so return!\n");
|
pr_warn("Audio Channel is still running so return!\n");
|
||||||
@ -730,9 +729,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
|
|||||||
_line_size = AUDIO_LINE_SIZE;
|
_line_size = AUDIO_LINE_SIZE;
|
||||||
|
|
||||||
if (dev->input_audiofilename) {
|
if (dev->input_audiofilename) {
|
||||||
str_length = strlen(dev->input_audiofilename);
|
dev->_audiofilename = kstrdup(dev->input_audiofilename,
|
||||||
dev->_audiofilename = kmemdup(dev->input_audiofilename,
|
GFP_KERNEL);
|
||||||
str_length + 1, GFP_KERNEL);
|
|
||||||
|
|
||||||
if (!dev->_audiofilename) {
|
if (!dev->_audiofilename) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
@ -743,9 +741,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)
|
|||||||
if (strcmp(dev->input_audiofilename, "") == 0)
|
if (strcmp(dev->input_audiofilename, "") == 0)
|
||||||
dev->_audiofilename = "/root/audioGOOD.wav";
|
dev->_audiofilename = "/root/audioGOOD.wav";
|
||||||
} else {
|
} else {
|
||||||
str_length = strlen(_defaultAudioName);
|
dev->_audiofilename = kstrdup(_defaultAudioName,
|
||||||
dev->_audiofilename = kmemdup(_defaultAudioName,
|
GFP_KERNEL);
|
||||||
str_length + 1, GFP_KERNEL);
|
|
||||||
|
|
||||||
if (!dev->_audiofilename) {
|
if (!dev->_audiofilename) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user