Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2850310lqo; Mon, 20 May 2024 21:17:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURNvnyIoLd/X5SXqNZCbRHYqbmrP2WtPXP9muM5Gzhbycf1Jjhm27ot/aVeJY8oUWdJtTjQ1zfS0jU5Uh3O8YCwZkbvKLeEFnisq4hHw== X-Google-Smtp-Source: AGHT+IECZ6o456F3haq5aq+2M1mZhrs57FKrXzi/sdtMSwVNDIDtU6xyEc/T7t8Uy2bBC9MIhn8/ X-Received: by 2002:a17:902:d4c8:b0:1e4:d548:818f with SMTP id d9443c01a7336-1ef4404fb62mr383821575ad.58.1716265038629; Mon, 20 May 2024 21:17:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716265038; cv=pass; d=google.com; s=arc-20160816; b=xuhkO+JfB2ulCpU38ROyLzh/EnYNEA1syBMzUp/w17xtot2d6xj9aVem21fqgZLeXm BtbDr4+FN7hqN2yNrweiHtb9Niz0EOGdZIYZskp9PPhKZBoEQ1oM4CqPtMgVFstRHhYg T9tGcHAX3kY5baNi3ns2PDFncvi9Igd9JELp/xb6K6xibx6Yu+sWSbPbUYNQfn1wDaXP hduJMaGxsT+myPPtBt9uh/j4HMmCuJZQF4kzfXwx5+X8ZBxxxOASu4thLe//LMuWkbjq f8HxIe9MjtuIImxo0oHyLLmP/t98DhYpPekykP9/M25cX9mW1GffqVEUZnGQjdcvL2k8 Dvjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=NFJvsgpYQT60Xttyy1WIPAvpbgVM1qZDWXLqI7JIiEA=; fh=mgABNjISpwV2Vy1d6HKgKroBmv36gUqIRcb6ZtqHMqs=; b=q16CgcxecgczpMO4IQN4WIj6l6mnvdhXHA7pB2NbiNHNJpyEN/+1eQHWUxSNvJCYtA FebHxGrw4GarKjoyZHBBWYp+/cAQCKUHexfVNvlEonDtDFduDhCSR+DuYJzgv2ZcrRAm 9DprfE0DZvK1yUcSUNugYf4obLJ0GYiMjGoNNoxT8nK9S6FskxqQ5Tf2WKOlA9uLA9XF cSRMwKB7bFZrwnDkc3/mw2IQMRg50i+byw5w0QBmAvAvAiUHgiK/sze0Fp9pCpmX5Es9 y0RAVIljSskfPabiM8NtlOFLrNp9vNQtT5zC/UrSK8d0yu+UQCo5SH7ryR9qXH0sxLe4 vwRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=iscas.ac.cn); spf=pass (google.com: domain of linux-kernel+bounces-184484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184484-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f2ffce0cc2si9244035ad.97.2024.05.20.21.17.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 21:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=iscas.ac.cn); spf=pass (google.com: domain of linux-kernel+bounces-184484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184484-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D7CDB218B9 for ; Tue, 21 May 2024 04:16:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07B472BAF0; Tue, 21 May 2024 04:16:42 +0000 (UTC) Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50DE51DA53; Tue, 21 May 2024 04:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716265001; cv=none; b=fFGEzmxyEyIwMLKSnK7AhdMaGvQ/5a7lXNQjHTOV+0vIoJMaDJGNl13ipFhITDBj18Up4iMVD2RBNhClkhuluqai1ESrdA/iDP3awWFD0DPrx5MmNVxDhFFFE/54gTySS3oOnnYc1322fDrhB5nY4ehP6WvDD7OPHKetJp+uC2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716265001; c=relaxed/simple; bh=8SrMCv0rwVNVT7qEZxTkQBKqwmbJBcICUOH07mFes1M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MvqMVxdY9HKkVwh3TQF79SrfN5teKNzByRf/vZJDkeWlh6kRCF+Wo3MghsCVLtcEJgCD+tMmjZx72BfJ090YbeLeJ5SSELX3q3xAExPcKB+CONC9K8ZvwOyfzonESrxcC9Dd4FU9xX9P6GHYaI7119rJ5nFfRYlyjvQR/GBtLZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost (unknown [124.16.138.129]) by APP-01 (Coremail) with SMTP id qwCowAC3vxsOIExmzSh6Bg--.25702S2; Tue, 21 May 2024 12:16:15 +0800 (CST) From: Chen Ni To: mkl@pengutronix.de, mailhol.vincent@wanadoo.fr, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, extja@kvaser.com, carsten.schmidt-achim@t-online.de Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chen Ni Subject: [PATCH] can: kvaser_usb: fix return value for hif_usb_send_regout Date: Tue, 21 May 2024 12:10:20 +0800 Message-Id: <20240521041020.1519416-1-nichen@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:qwCowAC3vxsOIExmzSh6Bg--.25702S2 X-Coremail-Antispam: 1UD129KBjvdXoWrurWDAF1fZr4xZF1DJFWkWFg_yoW3Zwc_KF y7Gw47Wry7Cry7Kw15Wa13Arn0y3WUZF4S9ayaqFyay347tr1jyr4ayrZ7G3sxWFy7XasF 9Fs3A348Jw1xZjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbxxFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2 Y2ka0xkIwI1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4 xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43 MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I 0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWU JVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUoO J5UUUUU X-CM-SenderInfo: xqlfxv3q6l2u1dvotugofq/ As the potential failure of usb_submit_urb(), it should be better to return the err variable to catch the error. Signed-off-by: Chen Ni --- drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c index 8faf8a462c05..871cd83bcabc 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c @@ -294,7 +294,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd, } usb_free_urb(urb); - return 0; + return err; } int kvaser_usb_can_rx_over_error(struct net_device *netdev) -- 2.25.1