Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3422937pxb; Tue, 20 Apr 2021 08:02:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT4+h610XR9gSCt0Mlanp5M1UQ3BVwxZw4VTlI1fQDgLBIpkjCf0leyFZYCtjiUdP4eRFS X-Received: by 2002:a05:6402:2216:: with SMTP id cq22mr4658445edb.265.1618930956940; Tue, 20 Apr 2021 08:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618930956; cv=none; d=google.com; s=arc-20160816; b=yDWXfF8udEUx+2Ud8MWz7lB0rDyQqnctIHT88OOA3kgmrbTjIqgbHqJRZ9Q69M6uFO NCRAo8/Bwy5bpYWI4fxid901ilQDZRXfbmiAf8+lcqUAGxJkBxug3p7roZK4d4Zu9vKK DiU2k6kaNy/L6/VjQ2QUEeG/VTHdK19UHn+/NcI+cnvwZyO+5xvKWMIgzI2qHEsui7Ra z2z1oy302W4MCTJpovyeNkivFIFgIqYLWd08GrRDWGz/k1HBF1SfI7gD05soQu9Ip62x KisWotds0IsfIe6b76Y6+W+xs0efkH8aY9gPBMZEfFAqHq9C4mLT2mUD5NtgBVLR8pSp tOdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=RlnTz8J7+YDqXjW+f25cjK93Cq9oDbkKEDkQOLL+ZdY=; b=TwDfyys+djOET2Yhc5c3vrspSZTflySaFdPuLpmhDRqTVo+sGNzcuC76dQnZncu8HC IVHtotTZUZ0NpA0OUdBeq4Fu57Y/h1aWVF/LBYNgvv8pOx1jWsu2O5pR7vLkZ9YwcxS2 BgpN9nLvX2RyIK5cV0aPlTWS+e+MDgqarcYp78YjPHUjzR6s54DzojvyXNlfDH1b77H9 7sn3cgpJ4KwN8HP5XggklvpgCoxvlr4dNdxLQKoBPQCu405LZpXYHYT/MFre4u04F/sh B1M787/fPtpzfmEkrTaCDprnOn+HrorEu7qbuxJ0gAcItA9+HEY+Hl0mNsga7Pn0ieGI nXAw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv16si15110768ejb.283.2021.04.20.08.02.05; Tue, 20 Apr 2021 08:02:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232838AbhDTPAT (ORCPT + 99 others); Tue, 20 Apr 2021 11:00:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:43068 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232778AbhDTPAS (ORCPT ); Tue, 20 Apr 2021 11:00:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E1153B2F2; Tue, 20 Apr 2021 14:59:45 +0000 (UTC) Date: Tue, 20 Apr 2021 16:59:45 +0200 Message-ID: From: Takashi Iwai To: Colin King Cc: Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails In-Reply-To: <20210420134719.381409-1-colin.king@canonical.com> References: <20210420134719.381409-1-colin.king@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Apr 2021 15:47:19 +0200, Colin King wrote: > > From: Colin Ian King > > Currently when the call to usb_urb_ep_type_check fails (returning -EINVAL) > the error return path returns -ENOMEM via the exit label "error". Other > uses of the same error exit label set the err variable to -ENOMEM but this > is not being used. I believe the original intent was for the error exit > path to return the value in err rather than the hard coded -ENOMEM, so > return this rather than the hard coded -ENOMEM. > > Addresses-Coverity: ("Unused value") > Fixes: 738d9edcfd44 ("ALSA: usb-audio: Add sanity checks for invalid EPs") > Signed-off-by: Colin Ian King Thanks, applied. Takashi