hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/hwmon/scpi-hwmon.c
....@@ -1,17 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * System Control and Power Interface(SCPI) based hwmon sensor driver
34 *
45 * Copyright (C) 2015 ARM Ltd.
56 * Punit Agrawal <punit.agrawal@arm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
10
- *
11
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12
- * kind, whether express or implied; without even the implied warranty
13
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
157 */
168
179 #include <linux/hwmon.h>
....@@ -235,11 +227,11 @@
235227
236228 sensor->scale = scale[sensor->info.class];
237229
238
- sensor->dev_attr_input.attr.mode = S_IRUGO;
230
+ sensor->dev_attr_input.attr.mode = 0444;
239231 sensor->dev_attr_input.show = scpi_show_sensor;
240232 sensor->dev_attr_input.attr.name = sensor->input;
241233
242
- sensor->dev_attr_label.attr.mode = S_IRUGO;
234
+ sensor->dev_attr_label.attr.mode = 0444;
243235 sensor->dev_attr_label.show = scpi_show_label;
244236 sensor->dev_attr_label.attr.name = sensor->label;
245237
....@@ -295,10 +287,8 @@
295287 * any thermal zones or if the thermal subsystem is
296288 * not configured.
297289 */
298
- if (IS_ERR(z)) {
290
+ if (IS_ERR(z))
299291 devm_kfree(dev, zone);
300
- continue;
301
- }
302292 }
303293
304294 return 0;