Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp395748pxj; Thu, 20 May 2021 11:49:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPKS3CPyPSbrcxUGRiMGGnCeIDht77XFV2cYj0puy9WE53/Xy4/4NBnYD94eSpJYpOSjdT X-Received: by 2002:a92:2a12:: with SMTP id r18mr6809797ile.170.1621536585326; Thu, 20 May 2021 11:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621536585; cv=none; d=google.com; s=arc-20160816; b=NCTrcbsOrns+S1A46lnB90JFV1Bb2OfE984J+9fru5ru61pOaWGCcDCu7nX7fZke7o T8tOg0oTiYq2zMd1UjFPXDoLpykbZbXTQ4+5jbkMgSKUxHxQO/EYeZaxY+DY/Dm91uFY 7XFFfbFw6dPhblcEY6Qig6g/C+nx4WEMkS3TTQTvrK7r49Z2tAmRiAz4SRhbRfMbwvkT ITyA6lXkA4wVefhYd1djbLHlQbbwF8F8Vj/jFANbn3Bw2Z98LhQeBxegban10YwsYThQ uYtTB3RkrRlO2B0/QHoT5Sh6/R7Le6o8uD5bUFb02EGOGBW+wmln4RFFUCKySUsuVknj o3hw== 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=O7SlIpW0XP/Ymt8133Qt5gCty12tCZXXkk2m3OGitqY=; b=eNfJo0PKqyM91Pt33QENA0VWkerulnAtRYmQmgKzWOrwVBBMn9lY3vRiafa+9jo65V mhE1fwQGpvrnEFdt1AxTjE+GQwXZ3TnjwsFSv4QHk9V9StqJDcVXwQRrGQQdTo3uahZs PuL5Pk6JW1qYTRvowIJdjiz2J6RMxRtRotPRaCz4isqoq/1XBYFIA9lwY73NRVRwfGdr GcXhRpMS1dHChXUR1CGg2+Dk7ApTjMcJ8aVHymH+vrjYchOcLs+MY0Bnshahe4M4/Cb9 146Y9GgaSi8wORQ543mFL+NIvqsoAA5U4ZC8fy7hZrFZRuCBW3o1mTvKYll4SHm3WyhQ ZcmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sr14ew1o; 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 q15si3363396jaj.2.2021.05.20.11.49.32; Thu, 20 May 2021 11:49:45 -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=Sr14ew1o; 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 S236506AbhETKYO (ORCPT + 99 others); Thu, 20 May 2021 06:24:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235587AbhETKMx (ORCPT ); Thu, 20 May 2021 06:12:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6D46A61440; Thu, 20 May 2021 09:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503842; bh=mvo2eDTKml7FAiVlgwLh2FbNba/I2yi4lzbUB1dhA+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sr14ew1oA5qJvGQSMJsSaoQ/ihogXqzo/VchFhRHuQP6Nmn0cL9VFcDy7pEpl6QPU 214TJgzo9VRbGqlpzZCvhoWl1BOc71o1QJ/3yq0hLE/h5yD/9by/r5VWDpDzeXFUJ2 3euJgWXVml/kYnezuWfC9ZbJKCHDGSAnAgC2o//k= 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.19 370/425] usb: fotg210-hcd: Fix an error message Date: Thu, 20 May 2021 11:22:19 +0200 Message-Id: <20210520092143.562695675@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 2d5a72c15069..226b38274a6e 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5569,7 +5569,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()) @@ -5589,7 +5589,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