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=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 ACAB0C433F5 for ; Thu, 16 Sep 2021 00:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96B0461164 for ; Thu, 16 Sep 2021 00:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233328AbhIPAJL (ORCPT ); Wed, 15 Sep 2021 20:09:11 -0400 Received: from mga18.intel.com ([134.134.136.126]:19965 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233336AbhIPAJK (ORCPT ); Wed, 15 Sep 2021 20:09:10 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="209542649" X-IronPort-AV: E=Sophos;i="5.85,296,1624345200"; d="scan'208";a="209542649" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 17:07:51 -0700 X-IronPort-AV: E=Sophos;i="5.85,296,1624345200"; d="scan'208";a="434311780" Received: from vyellapa-mobl.amr.corp.intel.com ([10.209.32.240]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 17:07:50 -0700 Message-ID: <43903e27cc9562b795eeeecc761dc2edec12f73d.camel@linux.intel.com> Subject: Re: [PATCH v4 3/4] Bluetooth: Fix passing NULL to PTR_ERR From: Tedd Ho-Jeong An To: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Date: Wed, 15 Sep 2021 17:07:50 -0700 In-Reply-To: <20210915233600.4129808-3-luiz.dentz@gmail.com> References: <20210915233600.4129808-1-luiz.dentz@gmail.com> <20210915233600.4129808-3-luiz.dentz@gmail.com> Organization: Intel Corporation Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, On Wed, 2021-09-15 at 16:35 -0700, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > Passing NULL to PTR_ERR will result in 0 (success), also since the likes of > bt_skb_sendmsg does never return NULL it is safe to replace the instances of > IS_ERR_OR_NULL with IS_ERR when checking its return. > > Reported-by: Dan Carpenter > Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An