remoteproc: Get rid of tedious error path
authorMathieu Poirier <mathieu.poirier@linaro.org>
Mon, 20 Apr 2020 23:16:01 +0000 (17:16 -0600)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 21 Apr 2020 02:29:59 +0000 (19:29 -0700)
commit226f5db4212438cdfe1a94652d74c6c01788a837
tree215c1f147f692801cc7031a71a65a40607db4949
parentbf860aa176d0104cfbaf863acbadf5548f1172c2
remoteproc: Get rid of tedious error path

Get rid of tedious error management by moving firmware and operation
allocation after calling device_initialize().  That way we take advantage
of the automatic call to rproc_type_release() to cleanup after ourselves
when put_device() is called.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Suman Anna <s-anna@ti.com>
Link: https://lore.kernel.org/r/20200420231601.16781-5-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c