From patchwork Tue Jun 26 12:55:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10488867 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 3E7AA602B3 for ; Tue, 26 Jun 2018 12:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26CDD28871 for ; Tue, 26 Jun 2018 12:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B9492896D; Tue, 26 Jun 2018 12:56:04 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 A5B5A28963 for ; Tue, 26 Jun 2018 12:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965258AbeFZM4A (ORCPT ); Tue, 26 Jun 2018 08:56:00 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:47852 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964940AbeFZMz7 (ORCPT ); Tue, 26 Jun 2018 08:55:59 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5QCsG1w186243; Tue, 26 Jun 2018 12:55:44 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-2017-10-26; bh=ahiZba7lS6PTdmTj5pkIW9VprYcMHLRsMaW3Lm5IwE8=; b=DQqeUIuPoIh9gPZ8tJBP7o4EwvPN4cEBQZCfnFnfmftDWUu2QeSz4zAljNY1YMwyHiFl IcRaMsVlhs1yBVqPNYhumHkONLovbpYMVYWAKmSj5/FwvjHPbJhGc4ToH3Ktw9nYIvPZ ojmKIS9f9ettat8XcoWhbFdQDwAYi35JuKBXIJU7TaUHHIpG/jzejU0aLOTdD6hG46T0 XAXqfFvHjOHds9DH5Hojblz7ipKE46i5zNfLF7EvDGNMm4cZ9acebs1aXZNFZQt+hMwI VcGvRkm4j3XQC6nI3U1jh3GjilV6BqCQcZ1xn5Y52kq6AcuqkUnmhqnORc88UOBZFOx6 MA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2jukmtrg4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jun 2018 12:55:44 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5QCthsQ005279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jun 2018 12:55:43 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5QCtgQp012411; Tue, 26 Jun 2018 12:55:42 GMT Received: from kili.mountain (/197.157.0.49) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 Jun 2018 05:55:42 -0700 Date: Tue, 26 Jun 2018 15:55:31 +0300 From: Dan Carpenter To: Alan Stern , Avi Fishman Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] USB: host: ehci-npcm7xx: Fix some error codes in probe Message-ID: <20180626125531.ybs25owtn7nvvxx4@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=8935 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806260147 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We accidentally return 1 instead instead the negative error codes. Fixes: df44831ee2dd ("USB host: Add USB ehci support for nuvoton npcm7xx platform") Signed-off-by: Dan Carpenter --- The original patch used the "USB host:" prefix. This is driver code and not generic USB host code so that's not the right thing. This is a very common mistake in new drivers... It's a pain because then it's up to me to guess what people want. Some subsystems have their own specific rules and I can't remember them all so I sometimes get it wrong. I probably guessed the obvious prefix this time so that's fine... -- To unsubscribe from this list: send the line "unsubscribe linux-usb" 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/usb/host/ehci-npcm7xx.c b/drivers/usb/host/ehci-npcm7xx.c index c80a8792d3b0..adaf8fb4b459 100644 --- a/drivers/usb/host/ehci-npcm7xx.c +++ b/drivers/usb/host/ehci-npcm7xx.c @@ -74,14 +74,14 @@ static int npcm7xx_ehci_hcd_drv_probe(struct platform_device *pdev) if (IS_ERR(gcr_regmap)) { dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-gcr\n", __func__); - return IS_ERR(gcr_regmap); + return PTR_ERR(gcr_regmap); } rst_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst"); if (IS_ERR(rst_regmap)) { dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-rst\n", __func__); - return IS_ERR(rst_regmap); + return PTR_ERR(rst_regmap); } /********* phy init ******/