hwmon: Do not accept invalid name attributes
authorGuenter Roeck <linux@roeck-us.net>
Fri, 28 Feb 2014 18:37:55 +0000 (10:37 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 3 Mar 2014 16:01:06 +0000 (08:01 -0800)
commit648cd48c9e566f53c5df30d79857e0937ae13b09
tree1fd88b546e0018249a91befa414730de0a9a553b
parent768821a302ae98c2d6a570e0ad63780180ba34db
hwmon: Do not accept invalid name attributes

hwmon name attributes must not include '-', as specified in
Documentation/hwmon/sysfs-interface. Also filter out spaces,
tabs, wildcards, and newline characters.

Tested-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c