From f6260f2e4951eb8633d8c3c7857ceb62241d4c3b Mon Sep 17 00:00:00 2001 From: Arushi Singhal Date: Tue, 28 Mar 2017 21:38:15 +0530 Subject: [PATCH] staging: media: atomisp: compress return logic Simplify function returns by merging assignment and return. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman --- .../staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 ++------ .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 10 ++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 626d2f114d8d..9bd186bad1bd 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -519,9 +519,7 @@ int atomisp_runtime_suspend(struct device *dev) if (ret) return ret; pm_qos_update_request(&isp->pm_qos, PM_QOS_DEFAULT_VALUE); - ret = atomisp_mrfld_power_down(isp); - - return ret; + return atomisp_mrfld_power_down(isp); } int atomisp_runtime_resume(struct device *dev) @@ -587,9 +585,7 @@ static int atomisp_suspend(struct device *dev) return ret; } pm_qos_update_request(&isp->pm_qos, PM_QOS_DEFAULT_VALUE); - ret = atomisp_mrfld_power_down(isp); - - return ret; + return atomisp_mrfld_power_down(isp); } static int atomisp_resume(struct device *dev) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c index 737ad66da900..ed33d4c4c84a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c @@ -440,7 +440,7 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event( enum ia_css_err ia_css_bufq_dequeue_psys_event( uint8_t item[BUFQ_EVENT_SIZE]) { - enum ia_css_err return_err; + enum ia_css_err; int error = 0; ia_css_queue_t *q; @@ -457,8 +457,7 @@ enum ia_css_err ia_css_bufq_dequeue_psys_event( } error = ia_css_eventq_recv(q, item); - return_err = ia_css_convert_errno(error); - return return_err; + return ia_css_convert_errno(error); } @@ -466,7 +465,7 @@ enum ia_css_err ia_css_bufq_dequeue_isys_event( uint8_t item[BUFQ_EVENT_SIZE]) { #if !defined(HAS_NO_INPUT_SYSTEM) - enum ia_css_err return_err; + enum ia_css_err; int error = 0; ia_css_queue_t *q; @@ -482,8 +481,7 @@ enum ia_css_err ia_css_bufq_dequeue_isys_event( return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE; } error = ia_css_eventq_recv(q, item); - return_err = ia_css_convert_errno(error); - return return_err; + return ia_css_convert_errno(error); #else (void)item; return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE; -- 2.20.1