[PATCH 1/1] leds: blinkm: remove unused variable 'ret' in blinkm_init_hw()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GCC reports the following warning with W=1:

drivers/leds/leds-blinkm.c:483:6: warning:
 variable 'ret' set but not used [-Wunused-but-set-variable]
  483 |  int ret;
      |      ^~~

This variable is not used, remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
---
 drivers/leds/leds-blinkm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
index b4e1fdff4186..e34879b4c275 100644
--- a/drivers/leds/leds-blinkm.c
+++ b/drivers/leds/leds-blinkm.c
@@ -480,9 +480,8 @@ static int blinkm_led_blue_set(struct led_classdev *led_cdev,
 
 static void blinkm_init_hw(struct i2c_client *client)
 {
-	int ret;
-	ret = blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
-	ret = blinkm_transfer_hw(client, BLM_GO_RGB);
+	(void)blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
+	(void)blinkm_transfer_hw(client, BLM_GO_RGB);
 }
 
 static int blinkm_test_run(struct i2c_client *client)
-- 
2.25.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux