diff mbox series

firmware: arm_scmi: Clean up a return statement

Message ID Y86im5M49p3ePGxj@kili (mailing list archive)
State New, archived
Headers show
Series firmware: arm_scmi: Clean up a return statement | expand

Commit Message

Dan Carpenter Jan. 23, 2023, 3:07 p.m. UTC
The comments say "enabled" where "disabled" is intended.  Also it's
cleaner to return zero explicitly instead of ret.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 drivers/firmware/arm_scmi/driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Cristian Marussi Jan. 24, 2023, 9:20 a.m. UTC | #1
On Mon, Jan 23, 2023 at 06:07:07PM +0300, Dan Carpenter wrote:
> The comments say "enabled" where "disabled" is intended.  Also it's
> cleaner to return zero explicitly instead of ret.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
>  drivers/firmware/arm_scmi/driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index d21c7eafd641..703f16ef3953 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -2739,8 +2739,8 @@ static int scmi_probe(struct platform_device *pdev)
>  				if (ret)
>  					goto clear_dev_req_notifier;
>  
> -				/* Bail out anyway when coex enabled */
> -				return ret;
> +				/* Bail out anyway when coex disabled. */
> +				return 0;
>  			}
>  
>  			/* Coex enabled, carry on in any case. */
> -- 

Indeed.

Thanks,
Cristian
Sudeep Holla March 9, 2023, 2:10 p.m. UTC | #2
On Mon, 23 Jan 2023 18:07:07 +0300, Dan Carpenter wrote:
> The comments say "enabled" where "disabled" is intended.  Also it's
> cleaner to return zero explicitly instead of ret.
> 
> 

Applied to sudeep.holla/linux (for-next/scmi/fixes), thanks!

[1/1] firmware: arm_scmi: Clean up a return statement
      https://git.kernel.org/sudeep.holla/c/8ab5059dc4f4
--
Regards,
Sudeep
diff mbox series

Patch

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index d21c7eafd641..703f16ef3953 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -2739,8 +2739,8 @@  static int scmi_probe(struct platform_device *pdev)
 				if (ret)
 					goto clear_dev_req_notifier;
 
-				/* Bail out anyway when coex enabled */
-				return ret;
+				/* Bail out anyway when coex disabled. */
+				return 0;
 			}
 
 			/* Coex enabled, carry on in any case. */