Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3490266pxj; Mon, 24 May 2021 07:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLMknip/pn+3BHOetYFu7WEK76+7R8vS/UQ6zyK4z2EaqOvRyzY67Zvhv0FAnnwg/g2LPY X-Received: by 2002:a5d:9d05:: with SMTP id j5mr17265353ioj.16.1621868164514; Mon, 24 May 2021 07:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621868164; cv=none; d=google.com; s=arc-20160816; b=D9CVekiLP/nZX5kTmDEMxthlmdyRvI5ml8hdIvbm6AGPJNvIhYt6YGmmPo92YIRQgc 1FqRWMAcv3PWB8Z2VEY8apj4eBh8XdLEPP5h4J68MB6CPwH8G7WtZxNWj73q2P5DsVW8 vFMIFQ0e+PxYwB+dHyXt2wsAY3dj0OuvH2VSRkImYktiISidym1fC2U0jqmZYbcbYjqZ 8u/ZE+VdO7INGjsIqe/uRxhUpCronSJ4get41X9d2hgbhHHG6WZS5ToPm1Qi9YYD0eGh ouzAyLAeAXdX5wBghu6FdqzImjI652LvavCmB9VzCxAPDVZFP2iNPhNbJDf/Ojh3IqLD 8K2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=pI1F4tDF6xx5yCqYNOWUW2DrZZvc3iGv9CqFhir4690=; b=nvwMENNMStrdNY/1ioS/9dh0bng4kOfbyJwNpnK1oxDpb4cGBg3uzoyuY+NzZbR+Mn +/9FTi+fvJZc9rqNePjssslXNxotvIC87EyVxJC4VQKnQs9ui7Ivj3BkrKvF/XJc9XtE 6l5qrZnNvBVVT+iNAQfL+6c2OFPbbeGQakLvvBGMXkdn8PACYplfoB8qykX0c4RDzGaD zhwFvJzdSgotOX7aqGwumcxpN/7v6j7iosG6PJKlLG66XZWqg7jogNdJ3DYI4q0Xox0w QZ4tpZ39ayQrwvnLkkJx+bZ0rcSFjr2lxBdiwBfRz+wXlIZidq3PA7PGLTf6F3SsHChI 4cTQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si14611833jak.126.2021.05.24.07.55.51; Mon, 24 May 2021 07:56:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233755AbhEXO4d (ORCPT + 99 others); Mon, 24 May 2021 10:56:33 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5689 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233980AbhEXOvy (ORCPT ); Mon, 24 May 2021 10:51:54 -0400 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fpg6T6t1wz1BRJ1; Mon, 24 May 2021 22:47:29 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 24 May 2021 22:50:18 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 24 May 2021 22:50:18 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 08/10] net: wan: replace comparison to NULL with "!card" Date: Mon, 24 May 2021 22:47:15 +0800 Message-ID: <1621867637-2680-9-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1621867637-2680-1-git-send-email-huangguangbin2@huawei.com> References: <1621867637-2680-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/wanxl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index a5f0aae30e0c..5a89b6d4d92e 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -600,7 +600,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, } card = kzalloc(struct_size(card, ports, ports), GFP_KERNEL); - if (card == NULL) { + if (!card) { pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; @@ -612,7 +612,7 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, card->status = dma_alloc_coherent(&pdev->dev, sizeof(struct card_status), &card->status_address, GFP_KERNEL); - if (card->status == NULL) { + if (!card->status) { wanxl_pci_remove_one(pdev); return -ENOBUFS; } -- 2.8.1