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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B29CCC43460 for ; Tue, 20 Apr 2021 14:59:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77568613CD for ; Tue, 20 Apr 2021 14:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbhDTPAU (ORCPT ); Tue, 20 Apr 2021 11:00:20 -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