aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorAlexey Klimov <klimov.linux@gmail.com>2008-12-27 20:40:57 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:40:12 -0500
commitd25cb6461ac93683ac04b2e181bcaa0cc15c349b (patch)
treebb2607426e2c5d7afa216f96176a5639abd97e86 /drivers/media/radio
parent6076dbf46a776a666166f8cdad97802334a0083c (diff)
V4L/DVB (10062): dsbr100: change return values in 3 functions
Patch replace return -1; with return retval; in 3 functions. And we also change if-checks for this returned values. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/dsbr100.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 5e0d651ffdd2..5474a22c1b22 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -236,7 +236,7 @@ usb_control_msg_failed:
236 dev_err(&radio->usbdev->dev, 236 dev_err(&radio->usbdev->dev,
237 "%s - usb_control_msg returned %i, request %i\n", 237 "%s - usb_control_msg returned %i, request %i\n",
238 __func__, retval, request); 238 __func__, retval, request);
239 return -1; 239 return retval;
240 240
241} 241}
242 242
@@ -279,7 +279,7 @@ usb_control_msg_failed:
279 dev_err(&radio->usbdev->dev, 279 dev_err(&radio->usbdev->dev,
280 "%s - usb_control_msg returned %i, request %i\n", 280 "%s - usb_control_msg returned %i, request %i\n",
281 __func__, retval, request); 281 __func__, retval, request);
282 return -1; 282 return retval;
283 283
284} 284}
285 285
@@ -336,7 +336,7 @@ usb_control_msg_failed:
336 dev_err(&radio->usbdev->dev, 336 dev_err(&radio->usbdev->dev,
337 "%s - usb_control_msg returned %i, request %i\n", 337 "%s - usb_control_msg returned %i, request %i\n",
338 __func__, retval, request); 338 __func__, retval, request);
339 return -1; 339 return retval;
340} 340}
341 341
342/* return the device status. This is, in effect, just whether it 342/* return the device status. This is, in effect, just whether it
@@ -452,7 +452,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
452 452
453 radio->curfreq = f->frequency; 453 radio->curfreq = f->frequency;
454 retval = dsbr100_setfreq(radio, radio->curfreq); 454 retval = dsbr100_setfreq(radio, radio->curfreq);
455 if (retval == -1) 455 if (retval < 0)
456 dev_warn(&radio->usbdev->dev, "Set frequency failed\n"); 456 dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
457 return 0; 457 return 0;
458} 458}
@@ -516,14 +516,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
516 case V4L2_CID_AUDIO_MUTE: 516 case V4L2_CID_AUDIO_MUTE:
517 if (ctrl->value) { 517 if (ctrl->value) {
518 retval = dsbr100_stop(radio); 518 retval = dsbr100_stop(radio);
519 if (retval == -1) { 519 if (retval < 0) {
520 dev_warn(&radio->usbdev->dev, 520 dev_warn(&radio->usbdev->dev,
521 "Radio did not respond properly\n"); 521 "Radio did not respond properly\n");
522 return -EBUSY; 522 return -EBUSY;
523 } 523 }
524 } else { 524 } else {
525 retval = dsbr100_start(radio); 525 retval = dsbr100_start(radio);
526 if (retval == -1) { 526 if (retval < 0) {
527 dev_warn(&radio->usbdev->dev, 527 dev_warn(&radio->usbdev->dev,
528 "Radio did not respond properly\n"); 528 "Radio did not respond properly\n");
529 return -EBUSY; 529 return -EBUSY;
@@ -585,7 +585,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
585 } 585 }
586 586
587 retval = dsbr100_setfreq(radio, radio->curfreq); 587 retval = dsbr100_setfreq(radio, radio->curfreq);
588 if (retval == -1) 588 if (retval < 0)
589 dev_warn(&radio->usbdev->dev, 589 dev_warn(&radio->usbdev->dev,
590 "set frequency failed\n"); 590 "set frequency failed\n");
591 591
@@ -604,7 +604,7 @@ static int usb_dsbr100_close(struct inode *inode, struct file *file)
604 radio->users = 0; 604 radio->users = 0;
605 if (!radio->removed) { 605 if (!radio->removed) {
606 retval = dsbr100_stop(radio); 606 retval = dsbr100_stop(radio);
607 if (retval == -1) { 607 if (retval < 0) {
608 dev_warn(&radio->usbdev->dev, 608 dev_warn(&radio->usbdev->dev,
609 "dsbr100_stop failed\n"); 609 "dsbr100_stop failed\n");
610 } 610 }
@@ -620,7 +620,7 @@ static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
620 int retval; 620 int retval;
621 621
622 retval = dsbr100_stop(radio); 622 retval = dsbr100_stop(radio);
623 if (retval == -1) 623 if (retval < 0)
624 dev_warn(&intf->dev, "dsbr100_stop failed\n"); 624 dev_warn(&intf->dev, "dsbr100_stop failed\n");
625 625
626 dev_info(&intf->dev, "going into suspend..\n"); 626 dev_info(&intf->dev, "going into suspend..\n");
@@ -635,7 +635,7 @@ static int usb_dsbr100_resume(struct usb_interface *intf)
635 int retval; 635 int retval;
636 636
637 retval = dsbr100_start(radio); 637 retval = dsbr100_start(radio);
638 if (retval == -1) 638 if (retval < 0)
639 dev_warn(&intf->dev, "dsbr100_start failed\n"); 639 dev_warn(&intf->dev, "dsbr100_start failed\n");
640 640
641 dev_info(&intf->dev, "coming out of suspend..\n"); 641 dev_info(&intf->dev, "coming out of suspend..\n");