Skip to content
Commit c12c507d authored by Axel Lin's avatar Axel Lin Committed by Jean Delvare
Browse files

hwmon: (ads7871) Fix ads7871_probe error paths



1. remove 'status' variable
2. remove unneeded initialization of 'err' variable
3. return missing error code if sysfs_create_group fail.
4. fix the init sequence as:
   - check hardware existence
   - kzalloc for ads7871_data
   - sysfs_create_group
   - hwmon_device_register

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 45ff34d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment