Re: [PATCH v3 1/4] thermal: loongson2: Trivial code style adjustment

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

 



On 20/04/2024 03:45, Binbin Zhou wrote:
Here are some minor code style adjustment. Such as fix whitespace code
style; align function call arguments to opening parenthesis, and add
devm_thermal_add_hwmon_sysfs() return value checking.

Signed-off-by: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
Acked-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
---

[ ... ]

  	}
ret = devm_request_threaded_irq(dev, irq, NULL, loongson2_thermal_irq_thread,
-			IRQF_ONESHOT, "loongson2_thermal", tzd);
+					IRQF_ONESHOT, "loongson2_thermal", tzd);
  	if (ret < 0)
  		return dev_err_probe(dev, ret, "failed to request alarm irq\n");
- devm_thermal_add_hwmon_sysfs(dev, tzd);
-
-	return 0;
+	return devm_thermal_add_hwmon_sysfs(dev, tzd);

You may not want to do this change. If the devm_thermal_add_hwmon_sysfs function fails, that does not jeopardize the initialization of this driver.


  }
static const struct loongson2_thermal_chip_data loongson2_thermal_ls2k1000_data = {
@@ -167,4 +167,5 @@ static struct platform_driver loongson2_thermal_driver = {
  module_platform_driver(loongson2_thermal_driver);
MODULE_DESCRIPTION("Loongson2 thermal driver");
+MODULE_AUTHOR("Loongson Technology Corporation Limited");
  MODULE_LICENSE("GPL");

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog





[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