From patchwork Fri Nov 23 07:20:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10695089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A8AA16B1 for ; Fri, 23 Nov 2018 07:20:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720A92BB44 for ; Fri, 23 Nov 2018 07:20:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C1BB2BC87; Fri, 23 Nov 2018 07:20:50 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 04B922BC36 for ; Fri, 23 Nov 2018 07:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390390AbeKWSDs (ORCPT ); Fri, 23 Nov 2018 13:03:48 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:36330 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387868AbeKWSDs (ORCPT ); Fri, 23 Nov 2018 13:03:48 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAN7IumO193364; Fri, 23 Nov 2018 07:20:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=Xht/WA5LvsBqwb6utVvq4dyoAmrrFhMqjBLoTss8nrc=; b=NbVsT5xYD6I58AhAgbQ2Y5uQZxtwA3kPvVPOFlP67Upb/kMbLet20BFRYuYq5uDVjl7K mePZk33bUyka+v0N+0GBS/iPtygoFG9BYRO1zhScA/y7SBKHxLE2FozW2t5iWtPgQSoG U9QXNJRux9YLCHxo/Zkyok8KRsx0IvzRJQQSmxNYUpmWDrfLq5fFDfgwEhjuvuuZv0tV hE4omAId+a3aG9iFfw3+Bj/P0AbtwfLhFXymyhk2GeGEhYyk5VbyEPupYo4LQHEZtkGi d0bT+9Wa5gpvmi4DxIe5wz9+6NrtCHEZ5yX0xSaIT5FhgcwokYIVpFu8WUe6C9cKpk7k 8w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2ntbmr1bmp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 07:20:33 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wAN7KWiS025311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Nov 2018 07:20:32 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAN7KWS0025962; Fri, 23 Nov 2018 07:20:32 GMT Received: from kili.mountain (/197.157.0.30) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Nov 2018 23:20:31 -0800 Date: Fri, 23 Nov 2018 10:20:24 +0300 From: Dan Carpenter To: Avi Fishman , Tomer Maimon Cc: Patrick Venture , Nancy Yuen , Brendan Higgins , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] spi: npcm: Fix an error code in the probe function Message-ID: <20181123072024.5vtjzta4rcmqtyph@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9085 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=875 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811230058 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 There is an IS_ERR() vs PTR_ERR() typo here. The current code returns 1 but we want to return the negative error code. Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Dan Carpenter --- drivers/spi/spi-npcm-pspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c index 342178e282bc..fed05b02007c 100644 --- a/drivers/spi/spi-npcm-pspi.c +++ b/drivers/spi/spi-npcm-pspi.c @@ -381,7 +381,7 @@ static int npcm_pspi_probe(struct platform_device *pdev) syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst"); if (IS_ERR(priv->rst_regmap)) { dev_err(&pdev->dev, "failed to find nuvoton,npcm750-rst\n"); - return IS_ERR(priv->rst_regmap); + return PTR_ERR(priv->rst_regmap); } /* reset SPI-HW block */