Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp68695pxj; Thu, 20 May 2021 04:46:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN2QrjYaCQqfeTSWyP3JJaGg80DA1yH/SPHAi7TFFK0sZtwPiH1ZvXTdVBnrOue7qVngCC X-Received: by 2002:a05:6402:1345:: with SMTP id y5mr4422752edw.107.1621511196167; Thu, 20 May 2021 04:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621511196; cv=none; d=google.com; s=arc-20160816; b=pSChtmACVaJNTjqR6u2d/T+3x6a8gaRXCgf/o/mh5QIqJE3Ez/RfwqCuxGhh2+DssW Lt4vaIa56IrrRvuCULjvBrPFs0XA4t5HDqbMJWsS9h+uIqg19LAByioaoLPcKgoOGdNr rP4u3Uat2eZ7q7uMkMO7c7M5WIUvw8WnnBdS1i3SCpQnY1Jb7hlhEeNIFQ8fyeaTQyA3 55Cgwp4AmLjN5/phNA4grZMqwYq5Kq0IZusldG9OgBpiSH9Mkwz+sBeP423nAXmLYzcK 7F08mMrrpyoImQWmQYiaPban3i02VEMfovNS4dpajdQoihD/u1KWeb0q+cHkCoSXQiyO dSVA== 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=nG7yMWZ3TiZdSAxIq106PbmSMLRkh/tlYnkkxbdvd/0=; b=FzA659Tne3fWEu+qEa2TetP2dkmlhk5KnNXAG6F9mwp+ceDCaHddQa7OK+egegupla tLb4PO4nEtxJ04+m1Tcan2/iVQ/mIZOinslQYurkqmF7GQip9Ue8aPbpzIh2b98ntLK4 Aep/HMJjTp8UUHFf81QWa475NnMddnyH2nG9a2xdQYydejYXT3y2HYPdPRhkhCEU6h1+ xcQciWLJyCbtjJ5m7Ecz/iwRfTQAUIBq+gI8X5FFr8QPZZJ4HabcI1kelsE/mk9l0CVi 7I2H/guVGBIF6OPBMv6+gC5F0N/mDgwR2gqywQuB5A5Z9AEmgkbidm6HzZrojVUMAEIF yBuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bbFR+ltl; 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 a9si15327ejc.442.2021.05.20.04.46.12; Thu, 20 May 2021 04:46:36 -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=bbFR+ltl; 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 S242003AbhETLnG (ORCPT + 99 others); Thu, 20 May 2021 07:43:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:43254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239551AbhETLWV (ORCPT ); Thu, 20 May 2021 07:22:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76E0661962; Thu, 20 May 2021 10:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505502; bh=GZ3C6n59e3n9ghMP7G81j0IE013CKYeByUyEE0SyP0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bbFR+ltlmjm57AGjsGHU6gl0EScd1DI4rzQmCTjHKzrx7KngRMcD8xD3r+aKT8sWn 3yaTN2QC1yR1ltWFC5FOcQa0/rHDtLxo/PHZy12Ns5Dh2owy386ljE9OdrCX36GnQi /LJZXjLjYvq1eL4WpDiV3yo9RWsMNIfIvbpg56To= 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.4 165/190] usb: fotg210-hcd: Fix an error message Date: Thu, 20 May 2021 11:23:49 +0200 Message-Id: <20210520092107.625502040@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 11b3a8c57eab..5dacc3076efd 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5610,7 +5610,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()) @@ -5630,7 +5630,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