if immediate return statement is found. It also removes variable bytes_written as it is no longer needed. It is done using script Coccinelle. And coccinelle uses following semantic patch for this compression function: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Nadim Almas<nadim.902@xxxxxxxxx> Acked-by: Julia Lawall <julia.lawall@xxxxxxx> --- Makefile | 2 +- drivers/staging/octeon-usb/octeon-hcd.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 4fb6bea..3d9d77a6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 4 PATCHLEVEL = 7 SUBLEVEL = 0 -EXTRAVERSION = -rc4 +EXTRAVERSION = -eudyptula-rc4 NAME = Psychotic Stoned Sheep # *DOCUMENTATION* diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 17442b3..b801c8a 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -508,15 +508,15 @@ static int octeon_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, { int ret; - ret = octeon_alloc_temp_buffer(urb, mem_flags); - if (ret) - return ret; + + if (octeon_alloc_temp_buffer(urb, mem_flags)) + return octeon_alloc_temp_buffer(urb, mem_flags); - ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); - if (ret) + + if (usb_hcd_map_urb_for_dma(hcd, urb, mem_flags)) octeon_free_temp_buffer(urb); - return ret; + return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); } /** @@ -542,8 +542,8 @@ static void octeon_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) */ static inline u32 cvmx_usb_read_csr32(struct octeon_hcd *usb, u64 address) { - u32 result = cvmx_read64_uint32(address ^ 4); - return result; + + return cvmx_read64_uint32(address ^ 4); } /** -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel