From patchwork Fri Sep 16 13:05: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: 9335759 X-Patchwork-Delegate: kvalo@adurom.com 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 9864D6077F for ; Fri, 16 Sep 2016 13:06:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A0F629F54 for ; Fri, 16 Sep 2016 13:06:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E6A829F8D; Fri, 16 Sep 2016 13:06:26 +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 CA67029F54 for ; Fri, 16 Sep 2016 13:06:22 +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 1bksqJ-0003VH-Hg; Fri, 16 Sep 2016 13:06:11 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bksqD-0003KF-N2 for ath10k@lists.infradead.org; Fri, 16 Sep 2016 13:06:10 +0000 Received: by mail-pf0-x242.google.com with SMTP id q2so972815pfj.0 for ; Fri, 16 Sep 2016 06:05:45 -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=zIKNHyN2yWLPUnvNaLxFCPhJySn65Uk8z0zRmhoRZOE=; b=cM4alk4z5j25/74f9hUTtGz6ZloK0zm0Ic+BD58OmkEVobm3rZ2kJRcaZh3VUqe8nh D2UIZ6CKpMb2mhDX+an8999BxsRNhkeGkA9zrfF74bcbmnhjwdPVjHT0SyQ+zloecfHq bwfQ9IgDHqfORQhWwxQGzyvpK3NSp3638mBYoImpF+kE5YE6hgQao4RtLHk4KDoZQOed YnSWtEoAVnrmmq3KpAF4eh9OjEtjkxRjwmIZIg2zLjWNi1lVRgyvZNvcKthahZNPkuWG 4Co4ctkrmtOdXxm1WI8FFBjpPewTXAf9ls/7E3QtFmCxhHbSqf1LmsgbpHFRwygyyy4Q /VNw== 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=zIKNHyN2yWLPUnvNaLxFCPhJySn65Uk8z0zRmhoRZOE=; b=lpXj7cPzoxkR6qX5oumsY/UKGnm3L5injcLOhmEoKlSLdLiuR9qqTSRQDtikpb9Sm6 hcVgUlM9k07k8CsGuDvZtqLxq2YXhcprOUF/wCVAdB6MhOsJFqQ4N4wRRf5q4P4rkyKD O28SWOdpMmD4aF2FAcfo7Mionzstymlr5rzAQd6jrx78061dwRC6/m31Q/LZl0EMaFAy LE0txDi5nkfSISaSmqjnST5lnV+gqYXFBv5HWWiv9umOxkfo5qNkV9qOIJSrbORA39kQ 3e9+oFr/ty++mqNsK6u6HWf4S9dTPsTSC15+mUjFkVUVD4BgxexPg0qsGwswPkkiykOe 1ZXQ== X-Gm-Message-State: AE9vXwND+urgc5Ds3m53pXH9GnTQ35WuEgSZ/b66qWfhbK/cQD/+mJ+qZ0ABgap2hZ8iCg== X-Received: by 10.98.57.2 with SMTP id g2mr8770625pfa.15.1474031144841; Fri, 16 Sep 2016 06:05:44 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id k69sm43540356pfb.85.2016.09.16.06.05.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 06:05:43 -0700 (PDT) From: Wei Yongjun To: Kalle Valo , Raja Mani Subject: [PATCH -next] ath10k: fix error return code in ahb Date: Fri, 16 Sep 2016 13:05:35 +0000 Message-Id: <1474031135-6963-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-20160916_060605_825379_218642C2 X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@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-wireless@vger.kernel.org, Wei Yongjun , ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in function ath10k_ahb_probe() or ath10k_ahb_resource_init(). Signed-off-by: Wei Yongjun --- drivers/net/wireless/ath/ath10k/ahb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index b99ad5d..6dc1c60 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c @@ -572,6 +572,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar) ar_ahb->irq = platform_get_irq_byname(pdev, "legacy"); if (ar_ahb->irq < 0) { ath10k_err(ar, "failed to get irq number: %d\n", ar_ahb->irq); + ret = ar_ahb->irq; goto err_clock_deinit; } @@ -850,6 +851,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev) chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS); if (chip_id == 0xffffffff) { ath10k_err(ar, "failed to get chip id\n"); + ret = -ENODEV; goto err_halt_device; }