[PATCH leds v2 22/50] leds: pm8058: cosmetic change: no need to return in if guard

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

 



We can return the last ret value.

Signed-off-by: Marek Behún <marek.behun@xxxxxx>
Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
---
 drivers/leds/leds-pm8058.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c
index 70b4d06488fec..193780a8c0522 100644
--- a/drivers/leds/leds-pm8058.c
+++ b/drivers/leds/leds-pm8058.c
@@ -147,12 +147,10 @@ static int pm8058_led_probe(struct platform_device *pdev)
 	init_data.fwnode = of_fwnode_handle(np);
 
 	ret = devm_led_classdev_register_ext(dev, &led->cdev, &init_data);
-	if (ret) {
+	if (ret)
 		dev_err(dev, "Failed to register LED for %pOF\n", np);
-		return ret;
-	}
 
-	return 0;
+	return ret;
 }
 
 static const struct of_device_id pm8058_leds_id_table[] = {
-- 
2.26.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux