[PATCH v1 4/6] leds: spi-byte: Utilise temporary variable for struct device

From: Andy Shevchenko
Date: Thu Jun 06 2024 - 13:31:42 EST


We have a temporary variable to keep a pointer to struct device.
Utilise it where it makes sense.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/leds/leds-spi-byte.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-spi-byte.c b/drivers/leds/leds-spi-byte.c
index 1fc0a8cc123e..e63958e584c2 100644
--- a/drivers/leds/leds-spi-byte.c
+++ b/drivers/leds/leds-spi-byte.c
@@ -116,7 +116,7 @@ static int spi_byte_probe(struct spi_device *spi)
init_data.devicename = "leds-spi-byte";
init_data.default_label = ":";

- ret = devm_led_classdev_register_ext(&spi->dev, &led->ldev, &init_data);
+ ret = devm_led_classdev_register_ext(dev, &led->ldev, &init_data);
if (ret) {
mutex_destroy(&led->mutex);
return ret;
--
2.43.0.rc1.1336.g36b5255a03ac