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: 9379845 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 B6173607D4 for ; Mon, 17 Oct 2016 16:23:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3EEB28FFC for ; Mon, 17 Oct 2016 16:23:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96A57290BB; Mon, 17 Oct 2016 16:23:46 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 276AA28FFC for ; Mon, 17 Oct 2016 16:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933777AbcJQQXo (ORCPT ); Mon, 17 Oct 2016 12:23:44 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36233 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932702AbcJQQXo (ORCPT ); Mon, 17 Oct 2016 12:23:44 -0400 Received: by mail-pa0-f68.google.com with SMTP id os4so5316457pac.3 for ; Mon, 17 Oct 2016 09:23:44 -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=jglIvb3oiF6aZWMGWlG5U59+twDyQTwDbKl9Zj1xV376yiYi+5L9XqUObmtkmkpxgW Ng0sCGhhXAoYDxiSJcwnXsNiwFDspbGtJw1lrmTDY+5F1akjXgprRra9xXrTVUWBTpVV NBNkrtwmhiJSQGUIaveeWciMpCYzLeJaN8+pNZ4YEB/yY7hhQzgX/PFFKaiw1fyhWcD9 3PjrbjTCIaEyD9TcL3J3f1h8pk1/mW1IEt3vlNhAmgDxU/ic0rGFO/sB/+V3zTPtZxVZ OiE9kS6YXAwX3ivixHeKSj/inlz79tC3JrHH1iLXZZZ7fAc+nLIL6kuorecaxW89e2Ot ORAA== X-Gm-Message-State: AA6/9RmPI6JjYLIl66KSUecr4ygYCRiXcIMG2n+YGQZIxcBOs0QlQn/4yQvuSXxkaogcUw== 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 Cc: Wei Yongjun , linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-remoteproc@vger.kernel.org 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 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);