diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-17 19:28:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:02 -0400 |
commit | 00d2e7ad9dd4e88224d091e454371d8a9a80719f (patch) | |
tree | a74121f3553bec2b1c88d8143a045e2b4a026265 /drivers/media/video/em28xx/em28xx-audio.c | |
parent | 67a8dbbc4e04cd256987b189352472a59aff73be (diff) |
[media] em28xx: Don't initialize a var if won't be using it
Fixes most cases of initializing a var but not using it.
There are still 3 cases at em28xx-alsa, were those vars should
probably be used.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 3c48a72eb7de..a24e1770db48 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -286,10 +286,9 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) | |||
286 | 286 | ||
287 | runtime->hw = snd_em28xx_hw_capture; | 287 | runtime->hw = snd_em28xx_hw_capture; |
288 | if (dev->alt == 0 && dev->adev.users == 0) { | 288 | if (dev->alt == 0 && dev->adev.users == 0) { |
289 | int errCode; | ||
290 | dev->alt = 7; | 289 | dev->alt = 7; |
291 | dprintk("changing alternate number to 7\n"); | 290 | dprintk("changing alternate number to 7\n"); |
292 | errCode = usb_set_interface(dev->udev, 0, 7); | 291 | usb_set_interface(dev->udev, 0, 7); |
293 | } | 292 | } |
294 | 293 | ||
295 | dev->adev.users++; | 294 | dev->adev.users++; |
@@ -342,6 +341,8 @@ static int snd_em28xx_hw_capture_params(struct snd_pcm_substream *substream, | |||
342 | 341 | ||
343 | ret = snd_pcm_alloc_vmalloc_buffer(substream, | 342 | ret = snd_pcm_alloc_vmalloc_buffer(substream, |
344 | params_buffer_bytes(hw_params)); | 343 | params_buffer_bytes(hw_params)); |
344 | if (ret < 0) | ||
345 | return ret; | ||
345 | format = params_format(hw_params); | 346 | format = params_format(hw_params); |
346 | rate = params_rate(hw_params); | 347 | rate = params_rate(hw_params); |
347 | channels = params_channels(hw_params); | 348 | channels = params_channels(hw_params); |
@@ -393,7 +394,7 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, | |||
393 | int cmd) | 394 | int cmd) |
394 | { | 395 | { |
395 | struct em28xx *dev = snd_pcm_substream_chip(substream); | 396 | struct em28xx *dev = snd_pcm_substream_chip(substream); |
396 | int retval; | 397 | int retval = 0; |
397 | 398 | ||
398 | switch (cmd) { | 399 | switch (cmd) { |
399 | case SNDRV_PCM_TRIGGER_START: | 400 | case SNDRV_PCM_TRIGGER_START: |
@@ -406,7 +407,7 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, | |||
406 | retval = -EINVAL; | 407 | retval = -EINVAL; |
407 | } | 408 | } |
408 | schedule_work(&dev->wq_trigger); | 409 | schedule_work(&dev->wq_trigger); |
409 | return 0; | 410 | return retval; |
410 | } | 411 | } |
411 | 412 | ||
412 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream | 413 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream |