Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp196453rwp; Wed, 12 Jul 2023 11:46:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0nsSXT3z2RGCgSYi2+dE1lk+2kh84weih7xB0bBTqMJuecHpEc5oFHKX4kE7+ah4NxVHD X-Received: by 2002:a17:907:8d11:b0:992:825d:71f1 with SMTP id tc17-20020a1709078d1100b00992825d71f1mr19922418ejc.39.1689187601289; Wed, 12 Jul 2023 11:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689187601; cv=none; d=google.com; s=arc-20160816; b=VvA4P0QKCXE1HFtrDfQxfN7yevr+a7FXe3ju25s9nCmvOS+YBK04qKBVsybaUNpCpc AJQarNRnSKJlmYogkkF9ZYs0u/g5I0GP8FU6qdJevlP+El9mB4CemCBV54K+sEn/Rvlz S87NfBwu/T0d3CuKWfEMeRzlbKTmGrOYo6a3mBkFqYcVk1G23V/1st9ldzfI3rmwQZ7C wQWw3wdfUfNjx7/SJOMqragsCgzJv3mV5Eezp6EHK6ILbAsxeON2+nMlvaWSCaUeglfb SE7GRlOdMsM5d/XF+nCNWF970CoZDwVSMQHjvhSuA5vh/s+oZw0ZEW/jhPD2cPCcZnOs sQJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=u0DMZJiVIf563aqVx60BkXx3lve5bk9ZgOTpPvU5Mu0=; fh=+laXofQnTu963gvjVpl34i4cy0OgeV16LCN2pSQ1/Jw=; b=SlXikeoR12ag6puqB/hiFDSAYb9gRDFOZktES5VgbiBotQJwPWbc4xcRqn77k3QAIw RWAmQrrHG255qsve+vf1NnxJZxXpil8KIfSxt95m1d8fVqSMCD6+9WJ0jikjyHpMm9AS RLMN4pGJz8zWlNqG6SbQHWwPL9rdabCC1D4S9adiwJkviUztpBUhHd+bwAIzke0MMyLS 2GzeA3/XWbpe4pgR3oXq+rSwpmnKaxqGS6poD0DRf1lHXhfsJOP5wmtpCDXoF3/hLQQO 0GV75dhSLwB2vezlIBCgKsd2jpDtoyBF8xjmSig/mPnwtdHQtEUPp0K4v4gvmgYDDeD9 gxyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EoK+8bj1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fx24-20020a170906b75800b00987ffac6129si5725368ejb.930.2023.07.12.11.46.16; Wed, 12 Jul 2023 11:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=EoK+8bj1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232483AbjGLS15 (ORCPT + 99 others); Wed, 12 Jul 2023 14:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbjGLS1z (ORCPT ); Wed, 12 Jul 2023 14:27:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D341CDC; Wed, 12 Jul 2023 11:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=u0DMZJiVIf563aqVx60BkXx3lve5bk9ZgOTpPvU5Mu0=; b=EoK+8bj1c8leE24XB6sfrjwrsO Af4oBayvGsRkwBvQmKmyZRkTUug4T5dPHblMRemI0875e+dzC2CVMgL9EO9DesFx4y88EgBTXqOJd cGC0WyVn+NSfhKEKrqri6eginv0tON5ut4P3TXarqd5krV6Y1HtP4gGgjAhE6Iha0h+wfTqKX7NVl NA10OSiuCRvhJGN1yKiBtKoZ9cusy/DMfficR0YYNMRrZSSWHg2yuCPazfyuETExvIXJCCKccwxTn /ibjxC35fSDl1xxM05sJY6PJTba6Hqp6Kv7njid7grNibyue+pGqL53uK+hUd0zhz0YOHKRyCFaNQ kyHMCvrQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qJeZ6-000tN5-0m; Wed, 12 Jul 2023 18:27:52 +0000 Date: Wed, 12 Jul 2023 11:27:52 -0700 From: Luis Chamberlain To: Minjie Du Cc: Jiri Slaby , Nick Kossifidis , Kalle Valo , "open list:ATHEROS ATH5K WIRELESS DRIVER" , open list , opensource.kernel@vivo.com Subject: Re: [PATCH v1] drivers: wireless: ath5k: fix parameter check in ath5k_debug_init_device Message-ID: References: <20230712124259.15096-1-duminjie@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230712124259.15096-1-duminjie@vivo.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 12, 2023 at 08:42:59PM +0800, Minjie Du wrote: > Make IS_ERR() judge the debugfs_create_dir() function return > in ath5k_debug_init_device(). > > Signed-off-by: Minjie Du > --- > drivers/net/wireless/ath/ath5k/debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c > index 4b41160e5..08058b3f7 100644 > --- a/drivers/net/wireless/ath/ath5k/debug.c > +++ b/drivers/net/wireless/ath/ath5k/debug.c > @@ -982,7 +982,7 @@ ath5k_debug_init_device(struct ath5k_hw *ah) > ah->debug.level = ath5k_debug; > > phydir = debugfs_create_dir("ath5k", ah->hw->wiphy->debugfsdir); > - if (!phydir) > + if (IS_ERR(phydir)) Please use IS_ERR_OR_NULL() instead. With that change added: Acked-by: Luis Chamberlain Luis