Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp490898pxj; Thu, 20 May 2021 14:18:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJCWFQjbW4qp/Q/zzYL+lKUDFgqLdJ5BwaRNJ2AFLo/2DypTuV4zVG61IuNEJeIl8hjMBC X-Received: by 2002:a17:906:8586:: with SMTP id v6mr6525236ejx.304.1621545490334; Thu, 20 May 2021 14:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621545490; cv=none; d=google.com; s=arc-20160816; b=0dmbFJ5C29hlRVZ9nQjP2cAACRgodBgWMfemLm2S/W/16mOX7TLuj2eIfHztDjdqIe wh8b1Kcl6Zv9qDIFFjzD5jA9oi7GSekyeHweOcLxwwbYSksWk4IKdJsQrl8c/2+PXqLs +8yK5XF1EE0p9btT+xVpwUobnkCgPZWhf+bB2nLNmw47uiBSfaSCrJCL+5Q8BLvfu958 YNXz+mZvuW7/JJD0Blp5jXhOPKwcjcHbtuV1q8gpROjTz63Snv4H7kpawx4rQOVyIBRX +Ta0uNvkRc5H1w9mAR2tbpBq+jwm1X3vBsId8d3eSMc4jtDbeGFBPOfLz9md8i+m36S5 W1UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5N83hPx0V2dDkNhOBl8ot7RFCTD6oyS17Ux1hRFtMXI=; b=FaJtM/lg3IgyRSj/y+AMfaRncSY2fp0UYaPifP+yS92OrQJgytL2Fv0q1oc/ZSlyWF VyC51t5rrWjVGRt18PrM9XVGeatt+ji2Pr41AtsfDCItTlr2UUiOULKQAUTJ34z7ul+J /QfsM9cssXK5KIAoD85eflat+mSAMo93ZgC/xnRU8/B7znydRAySpMZKrGJDV0FMmAWM paddfxfdI7sGVl4F3Bka+ZKcsJUm80PNFR9gxvr57+dampjQ8Ssxo0U7ON0MAZK5ME2i 8iPtF87fo/yNkyOQXvCMNOV2p8ArYBhogCzd5Xwf54sC0+oh68ahMyvtqB3rrcV9hn5y vZ0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BIiTtJgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si4266305ejd.313.2021.05.20.14.17.44; Thu, 20 May 2021 14:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BIiTtJgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238489AbhETLAo (ORCPT + 99 others); Thu, 20 May 2021 07:00:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:44060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236725AbhETKm7 (ORCPT ); Thu, 20 May 2021 06:42:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8FD5B611AB; Thu, 20 May 2021 09:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504596; bh=vrPQsS5vohMmoNLvcRohRRiorJSwpNCXhLAM2KepuIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BIiTtJgwff1RxbZsq3Z/ENOzhfJciqawkWon7h2IHp7tiC4lOb94DnQGDgTMzT0tB ldeBW3Zf6EOzqb7/4tDqo6IfHgun/OCyyKJI+YgT9Kyj7N6bjGf3W3chnirXL7bwS9 mGCILo4zg0+oyXo/KxthY+iBahoxfXDBvKMXsroE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Sasha Levin Subject: [PATCH 4.14 283/323] usb: fotg210-hcd: Fix an error message Date: Thu, 20 May 2021 11:22:55 +0200 Message-Id: <20210520092129.917786762@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit a60a34366e0d09ca002c966dd7c43a68c28b1f82 ] 'retval' is known to be -ENODEV here. This is a hard-coded default error code which is not useful in the error message. Moreover, another error message is printed at the end of the error handling path. The corresponding error code (-ENOMEM) is more informative. So remove simplify the first error message. While at it, also remove the useless initialization of 'retval'. Fixes: 7d50195f6c50 ("usb: host: Faraday fotg210-hcd driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/94531bcff98e46d4f9c20183a90b7f47f699126c.1620333419.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/fotg210-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index aa2103682808..bbe1ea00d887 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5598,7 +5598,7 @@ static int fotg210_hcd_probe(struct platform_device *pdev) struct usb_hcd *hcd; struct resource *res; int irq; - int retval = -ENODEV; + int retval; struct fotg210_hcd *fotg210; if (usb_disabled()) @@ -5618,7 +5618,7 @@ static int fotg210_hcd_probe(struct platform_device *pdev) hcd = usb_create_hcd(&fotg210_fotg210_hc_driver, dev, dev_name(dev)); if (!hcd) { - dev_err(dev, "failed to create hcd with err %d\n", retval); + dev_err(dev, "failed to create hcd\n"); retval = -ENOMEM; goto fail_create_hcd; } -- 2.30.2