From patchwork Fri Sep 16 14:00:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9335869 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 8EECE6077F for ; Fri, 16 Sep 2016 14:00:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FD0E28E6B for ; Fri, 16 Sep 2016 14:00:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74163297E5; Fri, 16 Sep 2016 14:00:29 +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 3ABBD297D5 for ; Fri, 16 Sep 2016 14:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756480AbcIPOA0 (ORCPT ); Fri, 16 Sep 2016 10:00:26 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33324 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbcIPOAZ (ORCPT ); Fri, 16 Sep 2016 10:00:25 -0400 Received: by mail-pa0-f68.google.com with SMTP id oz2so3514048pac.0 for ; Fri, 16 Sep 2016 07:00:25 -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=PhV7ntfGAnbgLHQ+QM11GbOUEbWVesKw6Zuz01i/hPE=; b=TBHfoQjNntW3FGrwjppTb+ItSUWDmx9I+KCydJXJKMJZG0pCiPDYZg2+IJv8mZxHmD hDqFPdNLe81CPGD17MdJmDzvMa0799EnSTqqARh5dERJRcZcbecmtaAFhnawQEcqbEwx zfc904vChbm3FUI8szoFsn3JmCejG1HDclm/gDsSGX98edMVBLHQ2jHBuZ+37DK9nLJC ZaQ/OInMd0wjzFvF9BMy0G0mSxsp461b/DzTZ0hJTblMbheP2rlemnhhU1h3obWVA4Uy yQ5UuiaZtoSFRHTZPXAq4Gx+fJnOqJl1s4mv+ExRwb5pBTwRBehIIamRymud5SwGAqiH nEDw== 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=PhV7ntfGAnbgLHQ+QM11GbOUEbWVesKw6Zuz01i/hPE=; b=huY8cr87bqMo6cEGq8c9alLzcE31EMC2FpmyZdOjJ48RsWu2ohq+VowcEW32tA4NJo 1FGeykNqQQHz2apR58d4YIlS0XSea389vIzlltAKEWceqqWERbqDUukD3IzcSWVDsuNm wxdCEff04qcpim4Q0JClqZaH5cMPLq1f1Pjlvgr4WlcmhgJh4AGTuGfqgiWxbLNiguSJ k5tZwbUxe4FjS7KuNHLh9+GUIrn9TiCaJJbHsHPpL3AockBfHUhDFNLpjQ544ilaGO3j p/1p8H/zbipbWNrCcogDyAyvd4Z5AcBccipMH1B0ZG0rJvazdY1QhMyEfJqYUBlnmA2s sKqA== X-Gm-Message-State: AE9vXwObtVPAFLwLJpuSYVa2MMj46jJajhPentCdih4pXitV8kagWPxxbjWtuBa9d1ZW1A== X-Received: by 10.66.67.51 with SMTP id k19mr23305519pat.55.1474034425143; Fri, 16 Sep 2016 07:00:25 -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 j4sm38375352pfc.59.2016.09.16.07.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 07:00:24 -0700 (PDT) From: Wei Yongjun To: Mark Brown , Kamal Dasu Cc: Wei Yongjun , linux-spi@vger.kernel.org Subject: [PATCH -next] spi: bcm-qspi: Fix error return code in bcm_qspi_probe() Date: Fri, 16 Sep 2016 14:00:19 +0000 Message-Id: <1474034419-26936-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.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 this function. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Wei Yongjun --- drivers/spi/spi-bcm-qspi.c | 2 ++ 1 file changed, 2 insertions(+) -- 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-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 8fff43e..ef0c466 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -1206,12 +1206,14 @@ int bcm_qspi_probe(struct platform_device *pdev, if (!num_ints) { dev_err(&pdev->dev, "no IRQs registered, cannot init driver\n"); + ret = -EINVAL; goto qspi_probe_err; } qspi->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(qspi->clk)) { dev_warn(dev, "unable to get clock\n"); + ret = PTR_ERR(qspi->clk); goto qspi_probe_err; }