From mboxrd@z Thu Jan 1 00:00:00 1970 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 1D952C433F5 for ; Thu, 29 Sep 2022 10:02:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA31D84D6B; Thu, 29 Sep 2022 12:01:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MZVLkMpU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EAADA84B2B; Thu, 29 Sep 2022 12:00:52 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 80C9E84CAA for ; Thu, 29 Sep 2022 12:00:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wr1-x430.google.com with SMTP id v28so1361853wrd.3 for ; Thu, 29 Sep 2022 03:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=JnsXSdbAaZwSKr0cLLjlmwLkvT/Ep55a1ZzHhVtGRME=; b=MZVLkMpUAcmnVyxKIPXVCvcYyV/zjgsAjv++2taeqL4KtRgUrEOvM/gGXtfT0QwJde jq16UP3cx73iEuZYVGHeFswaXU4iFcIDLTQXe7cZKMXxL2kaJoFgDyJ135i+7TEKj1AH F8GgK2SW1IcEn7g10zfJVSIpvdFisUHRb86PU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=JnsXSdbAaZwSKr0cLLjlmwLkvT/Ep55a1ZzHhVtGRME=; b=i8B9+Kk6oGgnARFFknACWosMTSGVmqg8oIqU+XYVYYckvS1nzgICCwFUW68sRfs8jF 0vEv97n4ANmZ2vHrnkeik3nHe94Usm5sFC33C4GfbLVuGJ0ipRsfcc7indy7k+bP/r0Y LiWfjxqa6lgh/KC1TEbijEbpzgJzpDdv+DP8CTv7LlytPUo/HP9Tbbi2czRKJ2f2m0uR RZjEia4VaZEr/I92HVnJwI3e3TTdZxlhIE+X1DXTfzoEBk+EVOkJLtKzz7BJvVPPhdeW GDxoISDuyaH6DULR9px8ptcjp8LhPTqGcMqtPANug5sanym/s94OvwTXHbmfJ4w8wbgo czHg== X-Gm-Message-State: ACrzQf0znSvQ7qY7Z8cpGToLMohI7uRvC9W/nNBHE4O1AQrbIssCwlUz 5g5R3mBl4MnUiMyzJVHaF2Y6L+cVSGgxLKnMqi3Msg== X-Google-Smtp-Source: AMsMyM6QeeDC8NbxwKseJ+N3o9dBNbsxPnmxfLceH5Ar1bKGRSF9Ict2jTpygNmhpKQwIh0nbuZcNZxXWhzbwVnz17s= X-Received: by 2002:a05:6000:1241:b0:226:d999:a2df with SMTP id j1-20020a056000124100b00226d999a2dfmr1541369wrx.19.1664445646794; Thu, 29 Sep 2022 03:00:46 -0700 (PDT) MIME-Version: 1.0 References: <03f3ea7aab287e15179a8c857db713e9cb7ee27a.1664093812.git.msuchanek@suse.de> In-Reply-To: <03f3ea7aab287e15179a8c857db713e9cb7ee27a.1664093812.git.msuchanek@suse.de> From: Simon Glass Date: Thu, 29 Sep 2022 04:00:33 -0600 Message-ID: Subject: Re: [PATCH v4 09/21] usb: ether: Fix error handling in usb_ether_init To: Michal Suchanek Cc: U-Boot Mailing List , Lukasz Majewski , Marek Vasut Content-Type: text/plain; charset="UTF-8" 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 On Sun, 25 Sept 2022 at 02:30, Michal Suchanek wrote: > > The code checks the return value from uclass_first_device as well as > that the device exists but it passes on the return value which may be > zero if there are no gadget devices. Just check that a device was > returned and return -ENODEV otherwise. > > Also remove the dev variable which is not really used for anything. > > Signed-off-by: Michal Suchanek > --- > drivers/usb/gadget/ether.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) Reviewed-by: Simon Glass