From patchwork Mon Oct 17 16:23:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BDFD1607D4 for ; Mon, 17 Oct 2016 16:25:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB98028947 for ; Mon, 17 Oct 2016 16:25:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C01128812; Mon, 17 Oct 2016 16:25:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 969F42926F for ; Mon, 17 Oct 2016 16:25:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwAhs-0003Iw-B3; Mon, 17 Oct 2016 16:24:08 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwAho-0003Ft-Il for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2016 16:24:05 +0000 Received: by mail-pa0-x241.google.com with SMTP id qn10so9381421pac.2 for ; Mon, 17 Oct 2016 09:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ehw7WdTOqP+HTkMav8pIgoln7W953ZZ0m3gqFWZL7eE=; b=mLQnP+EdO2s0mKH9F1BILbuDnW1Lv9Q30EPRaKlJtrSc1S/hsy7YkNyyNzNdsDqMud z8Rc2bfsceXqQnp/tz1ZZW4UxVa5XZcxnMDgTP05qFXU+edmGvNM8xu+JnxzkyrYDXkD gbSc3EwAmXOTm+hpDoXxY25e35Hs8KvSi8Li3BbXSjTdIV5xHO9QvGxD9NAyNbJjtqtw hil4Vw3MDjTmV8SYc8KZ16W5eINAMP7niLebL+SdGIRRqtj9TIxFUGu+7C1qTo7hzxSO ISvyuTM64P3Cn9h7CRM+lb/GfyXBNB4KKHlr8uyuFbL9GXv3JK6kegffa0D2rX1zvhFv VpMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ehw7WdTOqP+HTkMav8pIgoln7W953ZZ0m3gqFWZL7eE=; b=MLZ4f8r4niB5M13VVeqCXaPAb7jWq5zfY04ey87RCZuYXN+fLVpeIxy1vaG1DCd0ma XGZsiGPcTFRJn/9tfAHxjqPi8KrW5V2I4y1jAcr6NHJrEGf969RTUROf3uBd7BrWAASH 0beEGmBZXpVcMIOT2hYqTWdSgAuH2aclign/UeItFEfbRchF9cg3l3FxFIZaNWLt84QD zEcw6gDRso3aHRd3V9zX0Xi0vmDpepjhz17ngPjwePK4luuNr/2sic0836EOtvlD8+1N i8Z5LY6tv2omMm+qZoVipt+PntKYiWQUrKhpamVFqo5kTYqYrRldlG9dy4PHnd1fapLh +Zzw== X-Gm-Message-State: AA6/9Rl1fHYCkr46HUoEe5ImJpShDrJgW5s00x23cEb8gYXmZGXw/zxisvYfOwrhe4x6qg== X-Received: by 10.66.26.174 with SMTP id m14mr32801911pag.58.1476721423548; Mon, 17 Oct 2016 09:23:43 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id x1sm49389618pay.41.2016.10.17.09.23.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 09:23:43 -0700 (PDT) From: Wei Yongjun To: Patrice Chotard , Ohad Ben-Cohen , Bjorn Andersson 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> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161017_092404_727321_43DD480E X-CRM114-Status: GOOD ( 11.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-remoteproc@vger.kernel.org, Wei Yongjun , kernel@stlinux.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);