Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3786056pxj; Mon, 21 Jun 2021 06:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ4IO4WxKybzLtSu+/E45cqGCY7v01/VENPTVZ/XlkpkMOV7liYgqnayHow/vpr3JoNyMF X-Received: by 2002:a02:c906:: with SMTP id t6mr17942711jao.117.1624282617385; Mon, 21 Jun 2021 06:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624282617; cv=none; d=google.com; s=arc-20160816; b=uRdAveNEIf7wrmQPdeyRanKcuZ/mOeW97jYkPLbUOMPTQMKSESw1jJTP93cr719h+X TT6pvimONFX8fFXMHlq23VMKXBdE+oD/vEa1bjAqdR0sOd6CDiUXD7wG6X6KNhdgqpvR T5tn7wI7SdWCYFDEBT5OcbvkaWJcZPII73ukuLh2iOcWsEu8fD4uueKkjEnktRGuQdaA Y7pEynu71gjxPXrmX/J0lbvIkbgdIKPQWyujw6ym1QEoZbNZhgGCqDMNDK/gggUKw5af Xnc4q3Ad7+ziEv3Foe5FkEg1lur5fhzPNRrvbBT41avIn/RmT956xWt5IewYmBhhjyOV NtTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=Wq61hA8VpK15+asqyxgoJBgQRR/UMP1AaeemXMhFQn4=; b=QQxBScjX0j11KfK25rh0b+x+rkioitSwiA5FQdCBASGywrX73wsX3CUzCEG+LPowbv xYixJ8Tdghp3BZrLMtm3CfpipBKtR0aaY+2gsovpCxG+djYi34uWNjUP7bFltqVJlQ8E uA77fUOQ1Di9uVPw3ZDdOSPcQBY6SVUre8+QksPpqfAIOYUiDwAbEfreQ/yqV+SrdMLd RaoDdqKeSp69uBmyIeI5DJ207FEy62JZv0eXnJEqyLTFUK65iG2Z/WhluoN5ZmrmBBcx wdXf98A4DkCu/guUz29w9Qr6R8elwvLPdREq5tLbgpsUNEl10QkOczY2ClA8xOuru3Js LGiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EiiKPNVn; dkim=pass header.i=@suse.com header.s=susede1 header.b=EiiKPNVn; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si13778304ilj.6.2021.06.21.06.36.45; Mon, 21 Jun 2021 06:36:57 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=EiiKPNVn; dkim=pass header.i=@suse.com header.s=susede1 header.b=EiiKPNVn; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbhFUNhI (ORCPT + 99 others); Mon, 21 Jun 2021 09:37:08 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:52528 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbhFUNhH (ORCPT ); Mon, 21 Jun 2021 09:37:07 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A1ED621A62; Mon, 21 Jun 2021 13:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1624282492; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wq61hA8VpK15+asqyxgoJBgQRR/UMP1AaeemXMhFQn4=; b=EiiKPNVnJASX3uoJD+RlXYMcoiifKWJ0oT8akppe07HJGisIGcv2fpr8ox4rb6LdL6F+Wh glTGZ2aloxH9vkYtfrtqZiqZeF6cXmzMEDKsPoBoAKCzxnRcZDz/ouDIWR8SXBKJ2FoQVj zKtB9lOH8kHSAqYmGwx3OTPWDAPNkMs= Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 4AC69118DD; Mon, 21 Jun 2021 13:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1624282492; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wq61hA8VpK15+asqyxgoJBgQRR/UMP1AaeemXMhFQn4=; b=EiiKPNVnJASX3uoJD+RlXYMcoiifKWJ0oT8akppe07HJGisIGcv2fpr8ox4rb6LdL6F+Wh glTGZ2aloxH9vkYtfrtqZiqZeF6cXmzMEDKsPoBoAKCzxnRcZDz/ouDIWR8SXBKJ2FoQVj zKtB9lOH8kHSAqYmGwx3OTPWDAPNkMs= Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id NKRLEHyV0GAJVAAALh3uQQ (envelope-from ); Mon, 21 Jun 2021 13:34:52 +0000 Message-ID: <6122b97bb4a30a917b16837e8f98b6aac69f897a.camel@suse.com> Subject: Re: [PATCH] usb: class: cdc-wdm: return the correct errno code From: Oliver Neukum To: Junlin Yang , gregkh@linuxfoundation.org, penguin-kernel@i-love.sakura.ne.jp, loic.poulain@linaro.org, davem@davemloft.net, lee.jones@linaro.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Junlin Yang Date: Mon, 21 Jun 2021 15:34:51 +0200 In-Reply-To: <20210621132415.2341-1-angkery@163.com> References: <20210621132415.2341-1-angkery@163.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, den 21.06.2021, 21:24 +0800 schrieb Junlin Yang: > From: Junlin Yang > > The "rv" is initialized to "-ENOMEM", because "rv" is re-assigned to > "-EINVAL", when kmalloc & usb_alloc_urb failed, the return value > should > return "-ENOMEM" rather than "-EINVAL",so the "rv" assignment is > placed > in the position where usb_endpoint_is_int_in is false. > > Signed-off-by: Junlin Yang Acked-by: Oliver Neukum