HID: hid-sensor-hub: use devm_ functions consistently
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 2 Aug 2014 22:11:35 +0000 (03:41 +0530)
committerJiri Kosina <jkosina@suse.cz>
Tue, 12 Aug 2014 14:27:22 +0000 (16:27 +0200)
commit5be5db24fc0883d9e38df378c1de9a00f8933999
tree9d73748ec2f32c80f9caa0b1e2ec9371dfe50bff
parent6498d02306b337393b0bc92164857f3e6949c4e8
HID: hid-sensor-hub: use devm_ functions consistently

Use devm_kzalloc for all calls to kzalloc and not just the first.  Use
devm functions for other allocations as well. The calls to free the
allocated memory in the probe and remove functions are done away with
and a label is removed in the probe function.

The semantic match that finds the inconsistency is as follows:

// <smpl>
@@
@@

*devm_kzalloc(...)
...
*kzalloc(...)
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c