Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp60789pxj; Mon, 17 May 2021 20:57:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/TihHv/SLKERetNl3ktOWP+17GnNzSu7agwb0B5JIJEIX86K++8MhQVXEJzxvUfHkIfD1 X-Received: by 2002:a05:6602:1222:: with SMTP id z2mr2576783iot.120.1621310262171; Mon, 17 May 2021 20:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621310262; cv=none; d=google.com; s=arc-20160816; b=q4l7ptBHucyc0VBc1wSiv71lF7zaWAai/hcdTrDMLwjzE5IYCGc0UUjXPDdru5iMXK 8Bkm4M0fOVJRh9Uln9hiX2Urr5G9ZK7p8vIwcl+4mF/FuEcv5e51LwO6jVwLEQtp56pS VXD0i1MjgvkmnBFTyM3sVqPRy69PhKUGmq4ZofAzR0UYbudV4oZAmezr5E1LibARAAfD 0vqSvR+tvey1c1FfElJYTbShZ6dq0P1uFNkUU9aIy+Niahs4RQdRHQGZS23C+SAEQ4LG cfH/ZI0BUy3EgojqvloqpiXSmNAgPj50JA80J+yG6iP1efbOEgpYWWt1JRo2GNPt4hY4 WBSw== 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=UMc/gAHq1T+g3xIOx0XlrAU0Vt7SJz0BqEOAz7KcYrguRMYgHCH7YEKSRv/uMXhZuP PslkLKMGIe7SRTIS1CcJqWaRzYyOFd3NYln2G979RontVYNxXrvswClTElArWoCBDTpE qiXrPYtIG9T1dZIN4i6AEnkESzz+/YPDEAspzu9BwQmSrdjqbAP+oFwrUA24tcY0tm4i 2VNRVopaAx+3nZAjDgKedWJ14nvolrLoKKKRgjfYzW8QTrv1PP3veR4jjZKoZEBvRGRA x2kr896un3NxtNpJQTXMAJxfxTywoT732AzjqVemXPMX0257JTM+heQD7yUhCQckEpsh zBSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JAG1xLwG; 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 y7si3067090jap.36.2021.05.17.20.57.06; Mon, 17 May 2021 20:57:42 -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=JAG1xLwG; 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 S239761AbhEQOkx (ORCPT + 99 others); Mon, 17 May 2021 10:40:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:33954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240824AbhEQOfS (ORCPT ); Mon, 17 May 2021 10:35:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E79C61404; Mon, 17 May 2021 14:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261014; bh=4VmMxC+e+Hz6FH+qIsqesV5a2Jh7fJYo4OHneZ9G1qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JAG1xLwG/IkuorSnjKhhq3n1cW1kaDErAAeVdWY7Wp/mXYgFB6oQezGOTMHNrujPJ ye0Z2KWwfaWUgpQOTmwcxqRx+v9ZRbGd1qw2hM1UtWu7VKpmSO0p65SeyFNF+lFNgt oq4mW2mMlE4oCksC2nPRNs+CObDB19gNCRKID26c= 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.12 290/363] usb: fotg210-hcd: Fix an error message Date: Mon, 17 May 2021 16:02:36 +0200 Message-Id: <20210517140312.405054562@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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