Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp630674pxj; Tue, 18 May 2021 10:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyir0S22aBwpJPel1v0y8skB3YvnhiqxexTmFG5MynllK0kxdGsmKZDUFw7XHXfBBBx/R5B X-Received: by 2002:a05:6e02:b28:: with SMTP id e8mr5400893ilu.163.1621359360004; Tue, 18 May 2021 10:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621359359; cv=none; d=google.com; s=arc-20160816; b=AORdMK0JaOO6gxazf75JX9Z2QAnqEl8PYtCZJVUazE+s1BMukYbIg0IS4V5nWqEC6U 2hcfO8KOoi/DIR5T6TrzjFmtIgSyBZiPB8AXvQdHig8X4ax3ZXEeLxBJQNlLmDqIFAph rlnLNesKAcVW8oDGT1UDOF+5gR/vqvlT1dCfTYVyewxmvmEFRFpNrra7E+BlZXvCEI5y fhZ/ZqXIZBi27uFrWlksi+pqkgLtyrTwQ/Y+8nbC1ZrAhdC2aHJPBJyv+ih+1FWLl4Ni QFiRAohDUArgdEyfHeJAQSUIMg18Qs8XfvMWfG8zsR0qoCuoPEkAcWmHJYW/JwBiRnj+ N3hw== 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=ZfW26fw/GOejAQ/04Vqvk7TYow1apb+rVAPWH7982Vw=; b=yvKYB3vzbW+oJ4f3G3a/7c84mgmeE0GyVp+nrDXiwFqDQrreM/KYrokq2u9G3CPje7 VCl1ZYZDnX6KQfZ5J7u+pL/xlhurxdwQHalSmKcW6BrrBrU6ktCFV/5uWW9hnq3XSSoO p3KvNDef6C+aaUVXLfc73q1Sd4lNaqmAxcGXTXQxKzxCaoNqv/1CcZrDiRTllIBpPPsB YLfe6o4RJ1SLzghzUHoU2dZWz+jVbHh11DZEVFMK31AsUt3PVU7aJ7o9ebC+qBcubC+o MLurrAIvekLV1TIWFJ083dgQhQotni/w61L/pJSmhztOorQy/5csHSuR6eIfLUnE9py7 RoSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tkq3RPeG; 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 p17si703056jas.72.2021.05.18.10.34.56; Tue, 18 May 2021 10:35:59 -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=tkq3RPeG; 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 S1346329AbhEQQJM (ORCPT + 99 others); Mon, 17 May 2021 12:09:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:34740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344945AbhEQPqI (ORCPT ); Mon, 17 May 2021 11:46:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D165613BA; Mon, 17 May 2021 14:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262643; bh=56w+h4oJVB6yQrSykNlQqSFleJMF/VWNi+ezaiqIGJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tkq3RPeGPENWBR5I6eFyg76Sn7xjpKtxl1JYE6KPgry5kNLXck90fc695BUuLB1Hy lXmIu6SukQDMQ9sY8+N7Ev1y5BVuhebz6s4hhCuaVkpRkK/Otk667HgdcLNHUdH8Pu jH0KrrcZFePaJ40NVWAqayBGoHVqBqNOIkGJ/ZrE= 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.10 226/289] usb: fotg210-hcd: Fix an error message Date: Mon, 17 May 2021 16:02:31 +0200 Message-Id: <20210517140312.778815801@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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 1d94fcfac2c2..bd958f059fe6 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