projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45a5b3a
)
hwmon: (mc13783-adc) Increase size of name string
author
Guenter Roeck
<linux@roeck-us.net>
Fri, 13 Sep 2013 17:25:53 +0000
(10:25 -0700)
committer
Guenter Roeck
<linux@roeck-us.net>
Sun, 13 Oct 2013 23:16:26 +0000
(16:16 -0700)
smatch complains about
mc13783_adc_probe() error: snprintf() chops off the last chars of
'id->name': 20 +vs 10
Use PLATFORM_NAME_SIZE instead of '10' as size when declaring
the name variable.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/mc13783-adc.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/mc13783-adc.c
b/drivers/hwmon/mc13783-adc.c
index 982d8622c09b375f080bc2c81bfbacb71cf0896c..ae00e60d856c63c4a2a82a4cd6f5a4e994c31e64 100644
(file)
--- a/
drivers/hwmon/mc13783-adc.c
+++ b/
drivers/hwmon/mc13783-adc.c
@@
-37,7
+37,7
@@
struct mc13783_adc_priv {
struct mc13xxx *mc13xxx;
struct device *hwmon_dev;
- char name[
10
];
+ char name[
PLATFORM_NAME_SIZE
];
};
static ssize_t mc13783_adc_show_name(struct device *dev, struct device_attribute