From patchwork Sun Jul 20 14:02:04 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: 4591021 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0AA299F295 for ; Sun, 20 Jul 2014 14:02:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E86520115 for ; Sun, 20 Jul 2014 14:02:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69A5E2010E for ; Sun, 20 Jul 2014 14:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbaGTOCn (ORCPT ); Sun, 20 Jul 2014 10:02:43 -0400 Received: from m12-18.163.com ([220.181.12.18]:37687 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbaGTOCm (ORCPT ); Sun, 20 Jul 2014 10:02:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=UOoAISScLcgpeynqUC DCo25IiYqodavP6NlLtc4K3uA=; b=p7MVQ8XARCdLLC+JTSx0GGOsd7LAo7J49w vfqaOS4cUSUxcW7FjA9kl2KBUAg0UMUWLxlduIXIS3ycoHAqiriGm1iL0WTs9ZuK hsmRZnVZq05/UfCUHuUFYMHHJ+I/OSuVKxjVzg86ShRw+5IWLhVNHMfPkora03Yw UchgI1g7A= Received: from localhost.localdomain.localdomain (unknown [49.77.206.80]) by smtp14 (Coremail) with SMTP id EsCowECpBkXey8tTlNgBCA--.229S2; Sun, 20 Jul 2014 22:02:06 +0800 (CST) X-Coremail-DSSMTP: 49.77.206.80 From: weiyj_lk@163.com To: Heiko Stuebner , Mark Brown , Grant Likely , Rob Herring Cc: Wei Yongjun , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org Subject: [PATCH -next] spi/rockchip: fix error return code in rockchip_spi_probe() Date: Sun, 20 Jul 2014 22:02:04 +0800 Message-Id: <1405864924-14137-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 1.9.3 X-CM-TRANSID: EsCowECpBkXey8tTlNgBCA--.229S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7WryUGw45AF4xKFWDuFWfZrb_yoWxKrc_C3 45XF1xWr40qFsayay093y3Zr9IvFnYgr1vgF4qqFW7XFWDJw1Fg34kZw15JF1jy3yvkFsF yw1jqry8CF1rGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUYaoGPUUUUU== X-Originating-IP: [49.77.206.80] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/1tbivx7O1lD+U0U1-AAAsI 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 -EINVAL from the error handling case instead of 0 when failed to get fifo length. Signed-off-by: Wei Yongjun --- drivers/spi/spi-rockchip.c | 1 + 1 file changed, 1 insertion(+) -- 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-rockchip.c b/drivers/spi/spi-rockchip.c index cb8fd6f..8392ff5 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -642,6 +642,7 @@ static int rockchip_spi_probe(struct platform_device *pdev) rs->fifo_len = get_fifo_len(rs); if (!rs->fifo_len) { dev_err(&pdev->dev, "Failed to get fifo length\n"); + ret = -EINVAL; goto err_get_fifo_len; }