nvmem: mxs-ocotp: Use devm_add_action_or_reset() for cleanup
authorAnson Huang <Anson.Huang@nxp.com>
Mon, 23 Mar 2020 15:00:06 +0000 (15:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2020 19:05:23 +0000 (20:05 +0100)
commitbbde5709ee4f60a43b7372545454947044655728
tree122b55772c4af176a7f753a20c4bf1aaf115ec26
parent4bd5a15d933c1703910c756d961dbbd2e6d52181
nvmem: mxs-ocotp: Use devm_add_action_or_reset() for cleanup

Use devm_add_action_or_reset() for cleanup to call clk_unprepare(),
which can simplify the error handling in .probe, and .remove callback
can be dropped.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200323150007.7487-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/mxs-ocotp.c