From patchwork Fri Feb 19 17:10:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12095855 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=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 EC7E7C433DB for ; Fri, 19 Feb 2021 17:10:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7D5964EAF for ; Fri, 19 Feb 2021 17:10:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229755AbhBSRKy (ORCPT ); Fri, 19 Feb 2021 12:10:54 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:62783 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhBSRKx (ORCPT ); Fri, 19 Feb 2021 12:10:53 -0500 X-IronPort-AV: E=Sophos;i="5.81,189,1610406000"; d="scan'208";a="373577845" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 18:10:10 +0100 Date: Fri, 19 Feb 2021 18:10:10 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Tetsuo Handa cc: Valentina Manea , Shuah Khan , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@lists.01.org Subject: [PATCH] usb: usbip: fix odd_ptr_err.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: kernel test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Tetsuo Handa Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://github.com/0day-ci/linux/commits/UPDATE-20210219-175233/Tetsuo-Handa/usb-usbip-serialize-attach-detach-operations/20210219-083847 head: 32963105fe23b600644ac10f0f9a42124a289990 commit: 32963105fe23b600644ac10f0f9a42124a289990 usb: usbip: serialize attach/detach operations :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago The above link doesn't work for me, so I don't know whether the goto label is correct. usbip_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/usbip/usbip_common.c +++ b/drivers/usb/usbip/usbip_common.c @@ -775,7 +775,7 @@ int usbip_prepare_threads(struct usbip_t } tx = kthread_create(tx_fn, ud, tx_name); if (IS_ERR(tx)) { - err = PTR_ERR(rx); + err = PTR_ERR(tx); goto out_rx; } uti->tcp_socket = socket;