staging: iio: ad7192: Use devm_* APIs and fix a memory leak
authorSachin Kamat <sachin.kamat@linaro.org>
Sat, 31 Aug 2013 17:12:00 +0000 (18:12 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 7 Sep 2013 20:46:50 +0000 (21:46 +0100)
commit1e319cecdb4800e03a803e96da63091de0165ecb
treef665d6e047ae81acaf2ff8890c7981002d37af31
parent6898eb89655a8ac7d098b2fada95c1c91870365c
staging: iio: ad7192: Use devm_* APIs and fix a memory leak

devm_* APIs are device managed and make code simpler.

The memory leak was a lack of freeing the iio_dev structure in the
remove function.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7192.c