Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp493293pxj; Tue, 18 May 2021 07:59:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Mpii/G+lGHUa5coYauR8Pb1E18lVo+Me7m+Q2HEmQOx0OCsgYS3UDn0d5Hmu+ywGL1RC X-Received: by 2002:aa7:cad4:: with SMTP id l20mr7549625edt.382.1621349945715; Tue, 18 May 2021 07:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621349945; cv=none; d=google.com; s=arc-20160816; b=JWw/WRjTEVzzyOPtJgZM/LimSbsbCxa0vfkYj2/X/fx01LqsWuE00eS2MvqW/PybZV SE33ASdaqrpRc/8/81jC66KB/ZKvZWCJLPYenIxoYSBQTlwki+FnitIaS0GQKy31UZ1O feEpVMlZw4/KT73QA3Y16PZvCqhsQsiUqP8EX8zEiRDe8Fw1VMw2I4hlHso8SJ55vJMT B6tPgHBBZspYjsWfrtVcUWSq1e3ChXQtiVRc/0Le27eMsWTIisOCB1ei8PIoGn/LThdM inTfwoXwAA5+kZMCdx5XviH6OYPTnT+EcmK6qmlI25JpP1l6x7ddYEhPWKUMVYZh5xI1 Dyfg== 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=vgZmZb6QQHoGj4Cohruvf4puNsHt2mZ6HGI/zHgpj4M=; b=SIW7VpmgH2/r/KEcymyxihiVWdCRwLdmgUpQ4hNBuEH65qOWEdYJCNR81+R77Ck+w9 FcWQypYKah34afGxyuMrMMLnYFT0QB8oq9If219MvcEReV32FlGaVI3MOzGwIKKm59hA 2vWL3AyN2YkPja9dJHRRYSaMf+SeBbXztXpG3LXMhU7wZ4f4OBOEo/sk+2AbJcLNjQ2b Ea6G94HHOSGvF0KOCiLVbaEjWAoPoxkHqQA6hmESdPJE+Ejw2Si8JxuseregtrhInmlU SPgC0e53cqTxe4OkIDILoIW0PFX4ah0oLBWS0EvLSzvc/0Int1p8eaiFJyu7qUZBjWRk bJjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Np63jMpR; 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 u6si14547317edc.469.2021.05.18.07.58.31; Tue, 18 May 2021 07:59:05 -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=Np63jMpR; 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 S1344490AbhEQPt6 (ORCPT + 99 others); Mon, 17 May 2021 11:49:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:55422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245025AbhEQPcl (ORCPT ); Mon, 17 May 2021 11:32:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E0F0F61CCE; Mon, 17 May 2021 14:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262326; bh=4VmMxC+e+Hz6FH+qIsqesV5a2Jh7fJYo4OHneZ9G1qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Np63jMpRjeBLKr0qsei+ypwT+thk+C+sOfWKTgc1WpYwjNw/zOfS9WvIukKKQBqW1 OiwKUrvAi87pN+1gLe+keDjNN0p1qoBKG3w2ftq5LI6B/N13Hy5q22fqYYgEjKftRm ejuU5wGaLFWDC+xYnBL7B7QckLPCJ4LP5/2+VKuQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Sasha Levin Subject: [PATCH 5.11 265/329] usb: fotg210-hcd: Fix an error message Date: Mon, 17 May 2021 16:02:56 +0200 Message-Id: <20210517140311.075538406@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@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 5617ef30530a..f0e4a315cc81 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5568,7 +5568,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()) @@ -5588,7 +5588,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