summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2014-05-20 07:33:46 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:59:39 +0900
commit54886695bc7b0b69621a95fc3a2cb5056de3cf86 (patch)
treea15fb6280809352f809f0b590552b1743a2d74da /drivers/staging
parent6c8179fb3ffc4bd86826ceb5699091e9bed68978 (diff)
downloadlinux-3.10-54886695bc7b0b69621a95fc3a2cb5056de3cf86.tar.gz
linux-3.10-54886695bc7b0b69621a95fc3a2cb5056de3cf86.tar.bz2
linux-3.10-54886695bc7b0b69621a95fc3a2cb5056de3cf86.zip
upstream: [media] USB: as102_usb_drv.c: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/as102/as102_usb_drv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/media/as102/as102_usb_drv.c b/drivers/staging/media/as102/as102_usb_drv.c
index e4a69454ebe..e6f6278e97d 100644
--- a/drivers/staging/media/as102/as102_usb_drv.c
+++ b/drivers/staging/media/as102/as102_usb_drv.c
@@ -249,7 +249,7 @@ static void as102_free_usb_stream_buffer(struct as102_dev_t *dev)
static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)
{
- int i, ret = 0;
+ int i;
dev->stream = usb_alloc_coherent(dev->bus_adap.usb_dev,
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
@@ -280,7 +280,7 @@ static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)
dev->stream_urb[i] = urb;
}
- return ret;
+ return 0;
}
static void as102_usb_stop_stream(struct as102_dev_t *dev)
@@ -458,7 +458,6 @@ exit:
static int as102_release(struct inode *inode, struct file *file)
{
- int ret = 0;
struct as102_dev_t *dev = NULL;
dev = file->private_data;
@@ -467,7 +466,7 @@ static int as102_release(struct inode *inode, struct file *file)
kref_put(&dev->kref, as102_usb_release);
}
- return ret;
+ return 0;
}
MODULE_DEVICE_TABLE(usb, as102_usb_id_table);