From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: From: Wei Yongjun Subject: [PATCH -next] remoteproc: st: Fix error return code in st_rproc_probe() Date: Mon, 17 Oct 2016 16:23:35 +0000 Message-Id: <1476721415-20224-1-git-send-email-weiyj.lk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: Patrice Chotard , Ohad Ben-Cohen , Bjorn Andersson Cc: Wei Yongjun , linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-remoteproc@vger.kernel.org List-ID: From: Wei Yongjun Fix to return a negative error code from the st_rproc_state() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/remoteproc/st_remoteproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index ae8963f..da4e152 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -245,8 +245,10 @@ static int st_rproc_probe(struct platform_device *pdev) goto free_rproc; enabled = st_rproc_state(pdev); - if (enabled < 0) + if (enabled < 0) { + ret = enabled; goto free_rproc; + } if (enabled) { atomic_inc(&rproc->power);