HID: hid-sensor-hub: use devm_ functions consistently
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 8 Feb 2014 23:11:00 +0000 (23:11 +0000)
committerJonathan Cameron <jic23@kernel.org>
Thu, 14 Aug 2014 17:28:30 +0000 (18:28 +0100)
commit29db3cd372d1e75e2fadce5fd9961b7ef271061e
treee82d5879d582affda153b5339308e9596df7383c
parent7cdca1784c6e1c9bacf053847676df53eec7b5ea
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: Jonathan Cameron <jic23@kernel.org>
drivers/hid/hid-sensor-hub.c