diff mbox series

Braces added to the if

Message ID 20211207071215.42486-1-javad321javad@gmail.com
State Changes Requested
Delegated to: Andre Przywara
Headers show
Series Braces added to the if | expand

Commit Message

Javad Rahimipetroudi Dec. 7, 2021, 7:12 a.m. UTC
Signed-off-by: Javad Rahimi <javad321javad@gmail.com>
---

 board/sunxi/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Alexander Dahl Dec. 8, 2021, 6:13 a.m. UTC | #1
Hello Javad,

Am Tue, Dec 07, 2021 at 10:42:15AM +0330 schrieb Javad Rahimi:
> Signed-off-by: Javad Rahimi <javad321javad@gmail.com>
> ---
> 
>  board/sunxi/board.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index ff80283702..62d32b6329 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -1017,9 +1017,10 @@ void __led_init (led_id_t mask, int state)
>  
>  	ret = gpio_lookup_name(CUBIE2_LED_BOOT_GPIO, NULL, NULL, &gpio_boot_led);
>  
> -	if (ret)
> +	if (ret) {
>  		debug("[gpio_lookup_name]LED Err: %d", ret);
>  		return;
> +	}

Please squash this to the other patch and resend a v2.

If this would be a style change to existing code, it would still need
a better commit message, but it seems to be a fix for the patch you
send earlier. Please use ./scripts/checkpatch.pl before sending. ;-)

Greets
Alex

>  
>  	gpio_request(gpio_boot_led, "boot_led");
>  	gpio_direction_output(gpio_boot_led, 1);
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index ff80283702..62d32b6329 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -1017,9 +1017,10 @@  void __led_init (led_id_t mask, int state)
 
 	ret = gpio_lookup_name(CUBIE2_LED_BOOT_GPIO, NULL, NULL, &gpio_boot_led);
 
-	if (ret)
+	if (ret) {
 		debug("[gpio_lookup_name]LED Err: %d", ret);
 		return;
+	}
 
 	gpio_request(gpio_boot_led, "boot_led");
 	gpio_direction_output(gpio_boot_led, 1);