remoteproc: core: Move validate before device add
authorSiddharth Gupta <sidgup@codeaurora.org>
Tue, 15 Jun 2021 02:21:09 +0000 (19:21 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 23 Jun 2021 18:41:11 +0000 (13:41 -0500)
commit519346ecabd3c1d5821f076b5df1695ecfabe2f6
treefc89e4a499d1a80b4dcbb4207a4090270d8ea09d
parentc6659ee893e29912dd47f4d1d2db810fadf4d8fd
remoteproc: core: Move validate before device add

We can validate whether the remoteproc is correctly setup before
making the cdev_add and device_add calls. This saves us the
trouble of cleaning up later on.

Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1623723671-5517-3-git-send-email-sidgup@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c