Commit 388008bb authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron
Browse files

iio: ssp_sensors: don't manually free devm managed resources



The charme of devm_* functions is that you don't need to care about them
in the error path. In this case it is valid to just return NULL which makes
the device fail to probe and then the two gpios and the allocated memory
are freed automatically by the driver core.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1afacfb0
Supports Markdown
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