Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp217683rwb; Mon, 28 Nov 2022 19:36:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5P9Dsdg5cJ65fDDNXjHsj0ivOFjUrZwLp4oIflce5AClz2m4Ghdwc5aGqQwHWN5M0Dvcdf X-Received: by 2002:a17:90a:880f:b0:212:e996:704a with SMTP id s15-20020a17090a880f00b00212e996704amr62085887pjn.13.1669693008501; Mon, 28 Nov 2022 19:36:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669693008; cv=none; d=google.com; s=arc-20160816; b=f0eIXStoIlI6KVMLiL3VYElo2XggR4oHEensc9XrcjpeuFCk+aEqaf3LKMEC55e32A DVfwLLzfX9AnXPlsDdZIlJ5x+hjbK6irqAnRmJGAp80DrRPEOCK/uZjpMW4OB+eCkrYU GgDFYXCvtUiu8VWcSd30nYzY7La3DCm0yHbtMQy1/UBlGSVRNy6rs298H46VRGzQbQg/ HwA5l82TBj64G2rTxU/BhYpFXlH12WebUrNA0unSEI7QriaCO9V2o07OKOvu4KkbHB4a +Zw4X3dk9P5/fPS0PdJ1Xq9lYsQ4k2TDkYHbvyjVmH1K1DBRyrCaK5yk/ddFyQU46TJD hX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=BStjPnWD7k7Q32aXAfWDyQYxW67OUgFNlTixEFmkhpY=; b=HcVZKOoIoGgO6qx5mke/K8YCmaX1eRrhJRFDx0eRnZ0xFoKmzB2fKGb/+8MacNaF4m C7Ey9tPZfuIJFJ+ACWnfRhXET23gPYVJHWxmLEH8LfegXT0q5eziTFYwo7SE9ZazLwkv 70UsATRc80WGuYKLfpWZZMTAzHTI+dWRXhOcOvOgdLSjSlR1vKikNHEhvt4dtq9xLe8J jvgYVY8Mzl699xeiEhKLdysw9+Us6+/PGwPu0SIEsnRWXwe3IvYfnv9li9Iwl5mCxZXj hxKaMzrX6ckeIFcqI87OG1z6KInLugazTlr70YiNUNgbRm/4aT1zabl4JL3ZnTbdpuxV 8GUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a17090341c400b001889ad48288si15672069ple.384.2022.11.28.19.36.38; Mon, 28 Nov 2022 19:36:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235341AbiK2DNa (ORCPT + 82 others); Mon, 28 Nov 2022 22:13:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234820AbiK2DN2 (ORCPT ); Mon, 28 Nov 2022 22:13:28 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E2162DC; Mon, 28 Nov 2022 19:13:27 -0800 (PST) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NLnT82yxnzHwFb; Tue, 29 Nov 2022 11:12:44 +0800 (CST) Received: from localhost.localdomain (10.175.112.70) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 29 Nov 2022 11:13:25 +0800 From: Wang Yufen To: , , CC: , , Subject: [PATCH] USB: FHCI: fix error return code in of_fhci_probe() Date: Tue, 29 Nov 2022 11:33:30 +0800 Message-ID: <1669692810-26744-1-git-send-email-wangyufen@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.70] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return a negative error code of PTR_ERR(fhci->gpiods[i]) instead of 0. Fixes: a4efdb8a423b ("USB: FHCI: Switch to GPIO descriptors") Signed-off-by: Wang Yufen --- drivers/usb/host/fhci-hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 95a4446..afef72a 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c @@ -639,6 +639,7 @@ static int of_fhci_probe(struct platform_device *ofdev) NULL, i, GPIOD_OUT_LOW); if (IS_ERR(fhci->gpiods[i])) { + ret = PTR_ERR(fhci->gpiods[i]) dev_err(dev, "incorrect GPIO%d: %ld\n", i, PTR_ERR(fhci->gpiods[i])); goto err_gpios; -- 1.8.3.1