Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE0E0C433EF for ; Thu, 21 Jul 2022 17:29:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46915840B3; Thu, 21 Jul 2022 19:29:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jannau.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D2096840B3; Thu, 21 Jul 2022 19:29:38 +0200 (CEST) Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4874780306 for ; Thu, 21 Jul 2022 19:29:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jannau.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=j@jannau.net Received: from coburn.home.jannau.net (p579ad988.dip0.t-ipconnect.de [87.154.217.136]) by soltyk.jannau.net (Postfix) with ESMTPSA id C0E9B26EE23; Thu, 21 Jul 2022 19:29:35 +0200 (CEST) From: Janne Grunau To: Lukasz Majewski , u-boot@lists.denx.de Subject: [PATCH 1/1] usb: storage: stop probe on "Invalid device" Date: Thu, 21 Jul 2022 19:29:35 +0200 Message-Id: <20220721172935.13864-1-j@jannau.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Fixes a crash during probing of sd card readers without medium present. Link: https://github.com/AsahiLinux/linux/issues/44 Signed-off-by: Janne Grunau --- common/usb_storage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index eaa31374ef73..5a62d61f4382 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -236,9 +236,7 @@ static int usb_stor_probe_device(struct usb_device *udev) debug("%s: Found device %p\n", __func__, udev); } else { debug("usb_stor_get_info: Invalid device\n"); - ret = device_unbind(dev); - if (ret) - return ret; + return device_unbind(dev); } ret = blk_probe_or_unbind(dev); -- 2.35.1