From patchwork Sun Jul 20 14:03:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 4591031 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 75609C0514 for ; Sun, 20 Jul 2014 14:03:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAD4120115 for ; Sun, 20 Jul 2014 14:03:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E48842010E for ; Sun, 20 Jul 2014 14:03:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbaGTODZ (ORCPT ); Sun, 20 Jul 2014 10:03:25 -0400 Received: from m12-16.163.com ([220.181.12.16]:40290 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbaGTODZ (ORCPT ); Sun, 20 Jul 2014 10:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=GaPl0z9MeWlstWsLhG SCKuVZW3LYmLC5wW/t0i34iZI=; b=c4Zh6XxmSiLVJ4MgPci2LQnpNUBgOh6qVL QROmqLhUALlfNgUoo724Qb9828HxcCGVQasmxizT82+hLx3BUoNaiIJSHsKQgv0V 2e4Bpw5KpO6KRB2Ly2r+k0H0DzJMOwFVjaLYc1hcUAra/sH3fjAuHIt8GAR1CD9I kAr0S5MYI= Received: from localhost.localdomain.localdomain (unknown [49.77.206.80]) by smtp12 (Coremail) with SMTP id EMCowEDZpUckzMtTOaUYCA--.1154S2; Sun, 20 Jul 2014 22:03:16 +0800 (CST) X-Coremail-DSSMTP: 49.77.206.80 From: weiyj_lk@163.com To: Mark Brown , Grant Likely , Rob Herring Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH -next] spi: orion: Fix error return code in orion_spi_probe() Date: Sun, 20 Jul 2014 22:03:14 +0800 Message-Id: <1405864994-14292-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 1.9.3 X-CM-TRANSID: EMCowEDZpUckzMtTOaUYCA--.1154S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7WryUGw4xuFyxXF1xur18Grg_yoWfGFgEkr Z8ursxWr40grsrt3W2gw1ayrySvryDXr1FgwnrtayagrWDtwnrArWDZrn8CF47Zw48urZx Aw1kWw13Cry3GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUY3pnPUUUUU== X-Originating-IP: [49.77.206.80] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/xtbBDQTO1lIwSg+IAQAAs- Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the error handling case of orion_spi_reset() instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/spi/spi-orion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-spi" 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/spi/spi-orion.c b/drivers/spi/spi-orion.c index aa3ecfc..3a3170a 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -406,7 +406,8 @@ static int orion_spi_probe(struct platform_device *pdev) pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); pm_runtime_enable(&pdev->dev); - if (orion_spi_reset(spi) < 0) + status = orion_spi_reset(spi); + if (status < 0) goto out_rel_pm; pm_runtime_mark_last_busy(&pdev->dev);