Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5009704pxj; Wed, 9 Jun 2021 07:13:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW993M2+2oYTZnNaNvhflJRIM6zqA0etNItQwt8b5izBPDPVrltG7iaHmWA5ZceNtNWyAP X-Received: by 2002:a17:906:7d3:: with SMTP id m19mr82442ejc.546.1623248021641; Wed, 09 Jun 2021 07:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623248021; cv=none; d=google.com; s=arc-20160816; b=qO3CR8f19VqQNEeb98+DOXT7/ghSmZuTV0i304aURIOjSdk74LlBJ+KGZSl+6Xx7XO NvlG70YYT8s/rTOJBNHX+gdVrIpaTeFFAtu0Peq4klAQLaY92Gl1HfUBwIyG5EIvQkZv QGtZmk43oMi9PVQ4FSQ/ljFukXJ5epxA0lYVyOLAAJokaPJOWKzGzTxAEmEVqgaEHJEd TfvWbaMY/Ijp+5IeytCr4+91kZEmM3bqAzm6SQoALV8yYCTdiMNUkDMHQqzQNI4TiQOd 3mab0J37PvAW3Co+n2vLkuQbPjjrklrumjxKzAlD8+DrEzeW2nt/IGcDo53Qw2bBfpHM CU4A== 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=qblph5ksOlOG2SsMS52DGq8leOM49S4ZQalGZpZTkV8=; b=kFUoRmLR0ZuSf1NsfgE/sXBLxy+1MJK8gnVyxMY4CV/n1FyIt04aNtZ2/JWrvNwTHU 5w2t19DpNg6jyfnKp8g1BSoKSzlbocxwiATDs7A6BTvpRC1V9EWLXjCgYXy7MTARzYNX kRwYGWlotb9R6kjNCQCdCMvgmtcdlC1HzAKWPWKDHeVtqyciovMf9c2Ner9lChgbtvH2 4yfVZleq4IMZEbFQ6KvslmJZt35lGAI249gPsS5Uz4DS6vI83wTGHmbJDpHtBzvHEEgn EcOZIplU8vOhWVF1JpWOJDR41jYRVZhYBq3lBV85euE1k7gpUAqQhXT8pwaMBrq4qP1U RFhA== 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 3si2636330ejx.158.2021.06.09.07.13.17; Wed, 09 Jun 2021 07:13:41 -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 S238286AbhFIJpe (ORCPT + 99 others); Wed, 9 Jun 2021 05:45:34 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5469 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238247AbhFIJp2 (ORCPT ); Wed, 9 Jun 2021 05:45:28 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G0MXq4k8YzZfcQ; Wed, 9 Jun 2021 17:40:27 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 9 Jun 2021 17:43:04 +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; Wed, 9 Jun 2021 17:43:04 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 7/9] net: lapbether: replace comparison to NULL with "lapbeth_get_x25_dev" Date: Wed, 9 Jun 2021 17:39:53 +0800 Message-ID: <1623231595-33851-8-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623231595-33851-1-git-send-email-huangguangbin2@huawei.com> References: <1623231595-33851-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) 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 "lapbeth_get_x25_dev". Signed-off-by: Peng Li --- drivers/net/wan/lapbether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 60628aa..74694af 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -451,7 +451,7 @@ static int lapbeth_device_event(struct notifier_block *this, switch (event) { case NETDEV_UP: /* New ethernet device -> new LAPB interface */ - if (lapbeth_get_x25_dev(dev) == NULL) + if (!lapbeth_get_x25_dev(dev)) lapbeth_new_device(dev); break; case NETDEV_GOING_DOWN: -- 2.8.1