From patchwork Thu Jul 21 17:29:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau X-Patchwork-Id: 1659237 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LpfhY0NXRz9s07 for ; Fri, 22 Jul 2022 03:29:47 +1000 (AEST) 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 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 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 Reviewed-by: Simon Glass --- 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);