diff mbox series

[v2] interconnect: qcom: icc-rpm: Explicitly return 0 at the end of the function

Message ID 20230717125534.2455745-1-djakov@kernel.org (mailing list archive)
State Not Applicable
Headers show
Series [v2] interconnect: qcom: icc-rpm: Explicitly return 0 at the end of the function | expand

Commit Message

Georgi Djakov July 17, 2023, 12:55 p.m. UTC
From: Georgi Djakov <djakov@kernel.org>

Fix the following smatch error:
drivers/interconnect/qcom/icc-rpm.c:243 qcom_icc_rpm_set() error: uninitialized symbol 'ret'.

Fixes: 32846c4a8f2a ("interconnect: qcom: icc-rpm: Set bandwidth on both contexts")
Signed-off-by: Georgi Djakov <djakov@kernel.org>
---
v2: Just return 0 when reaching the end of the function. (Thanks Stephan!)
v1: https://lore.kernel.org/r/20230717073429.2115015-1-djakov@kernel.org

 drivers/interconnect/qcom/icc-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephan Gerhold July 17, 2023, 1:04 p.m. UTC | #1
On Mon, Jul 17, 2023 at 03:55:34PM +0300, djakov@kernel.org wrote:
> From: Georgi Djakov <djakov@kernel.org>
> 
> Fix the following smatch error:
> drivers/interconnect/qcom/icc-rpm.c:243 qcom_icc_rpm_set() error: uninitialized symbol 'ret'.
> 
> Fixes: 32846c4a8f2a ("interconnect: qcom: icc-rpm: Set bandwidth on both contexts")
> Signed-off-by: Georgi Djakov <djakov@kernel.org>
> ---
> v2: Just return 0 when reaching the end of the function. (Thanks Stephan!)
> v1: https://lore.kernel.org/r/20230717073429.2115015-1-djakov@kernel.org
> 
>  drivers/interconnect/qcom/icc-rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 612390b9eb18..2c16917ba1fd 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -240,7 +240,7 @@ static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw)
>  		}
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  /**

Thanks!

Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
diff mbox series

Patch

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index 612390b9eb18..2c16917ba1fd 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -240,7 +240,7 @@  static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw)
 		}
 	}
 
-	return ret;
+	return 0;
 }
 
 /**