]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb1eab618eef5d187c7c414a952f741f0045184c9
tree9d73748ec2f32c80f9caa0b1e2ec9371dfe50bff
parentd50198ee7d15fc1c749725cd5c1cfc2716797b08
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