summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/dsbr100.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2008-12-27 23:40:57 -0200
committerDouglas Schilling Landgraf <dougsland@redhat.com>2008-12-27 23:40:57 -0200
commit67e8d5340faf1ee4bbce414e75c9d5a8dfa81781 (patch)
treed362bd7fe0a7bd96a590db593901056ab016c861 /linux/drivers/media/radio/dsbr100.c
parent54642f50524632245726a4bdf347ac8ff766c188 (diff)
downloadmediapointer-dvb-s2-67e8d5340faf1ee4bbce414e75c9d5a8dfa81781.tar.gz
mediapointer-dvb-s2-67e8d5340faf1ee4bbce414e75c9d5a8dfa81781.tar.bz2
dsbr100: change return values in 3 functions
From: Alexey Klimov <klimov.linux@gmail.com> Patch replace return -1; with return retval; in 3 functions. And we also change if-checks for this returned values. Priority: normal Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/radio/dsbr100.c')
-rw-r--r--linux/drivers/media/radio/dsbr100.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c
index ed71f1d35..9c8e96f81 100644
--- a/linux/drivers/media/radio/dsbr100.c
+++ b/linux/drivers/media/radio/dsbr100.c
@@ -239,7 +239,7 @@ usb_control_msg_failed:
dev_err(&radio->usbdev->dev,
"%s - usb_control_msg returned %i, request %i\n",
__func__, retval, request);
- return -1;
+ return retval;
}
@@ -282,7 +282,7 @@ usb_control_msg_failed:
dev_err(&radio->usbdev->dev,
"%s - usb_control_msg returned %i, request %i\n",
__func__, retval, request);
- return -1;
+ return retval;
}
@@ -339,7 +339,7 @@ usb_control_msg_failed:
dev_err(&radio->usbdev->dev,
"%s - usb_control_msg returned %i, request %i\n",
__func__, retval, request);
- return -1;
+ return retval;
}
/* return the device status. This is, in effect, just whether it
@@ -455,7 +455,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
radio->curfreq = f->frequency;
retval = dsbr100_setfreq(radio, radio->curfreq);
- if (retval == -1)
+ if (retval < 0)
dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
return 0;
}
@@ -519,14 +519,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
case V4L2_CID_AUDIO_MUTE:
if (ctrl->value) {
retval = dsbr100_stop(radio);
- if (retval == -1) {
+ if (retval < 0) {
dev_warn(&radio->usbdev->dev,
"Radio did not respond properly\n");
return -EBUSY;
}
} else {
retval = dsbr100_start(radio);
- if (retval == -1) {
+ if (retval < 0) {
dev_warn(&radio->usbdev->dev,
"Radio did not respond properly\n");
return -EBUSY;
@@ -588,7 +588,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
}
retval = dsbr100_setfreq(radio, radio->curfreq);
- if (retval == -1)
+ if (retval < 0)
dev_warn(&radio->usbdev->dev,
"set frequency failed\n");
@@ -607,7 +607,7 @@ static int usb_dsbr100_close(struct inode *inode, struct file *file)
radio->users = 0;
if (!radio->removed) {
retval = dsbr100_stop(radio);
- if (retval == -1) {
+ if (retval < 0) {
dev_warn(&radio->usbdev->dev,
"dsbr100_stop failed\n");
}
@@ -623,7 +623,7 @@ static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
int retval;
retval = dsbr100_stop(radio);
- if (retval == -1)
+ if (retval < 0)
dev_warn(&intf->dev, "dsbr100_stop failed\n");
dev_info(&intf->dev, "going into suspend..\n");
@@ -638,7 +638,7 @@ static int usb_dsbr100_resume(struct usb_interface *intf)
int retval;
retval = dsbr100_start(radio);
- if (retval == -1)
+ if (retval < 0)
dev_warn(&intf->dev, "dsbr100_start failed\n");
dev_info(&intf->dev, "coming out of suspend..\n");