Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1029037pxj; Thu, 17 Jun 2021 20:38:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVDRim8OWwtwRuJASQiGFitOlSvkz+8PrimJda30IsebnP/8eRS78yjhDaRQn2jl0fAxdx X-Received: by 2002:a5e:8e03:: with SMTP id a3mr6292101ion.116.1623987528181; Thu, 17 Jun 2021 20:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623987528; cv=none; d=google.com; s=arc-20160816; b=hw2+S9Bd8sqTle8HJs41D65+LlM3q0gQWC0IELu99pRM2Q5IEiu+U9Kxw+kcxWRNbu aWaz70FQG8YK5dU0NzK1aUmBVnr51QwSCxqkKDypvdmXJz8Q8vTEsp/R+sFTI7oHnhL1 1JeZ7BHJrAD3Xl5t7ACzKiBIC+AVwNVxjdgtwS+FiVwVQ+Ci2AQNkbouMWQCzadFj4UK GKeia2ItelZMfDYw1R11F+ndubZwJqdD+8myy6Nu7vqHK6cTI0bspI6jJ2IM99EPMVev cywusSYphzsnuE6+PIM/a2OAmuz1iD0unF3dNodj2kumTzErW9XAAo/jUaaewQFaO1pZ zn1A== 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=b0bRQevNCGH6NmHy1vcjXS1myrVa7mJnbAch99g/Ais=; b=n3nIEUhZ4R7cUfXqdOJx4iOAsLpO7m8GZH5ESTTp3c8qzS4Wf58hM73mIGgWN6x+HZ L4G2VpNYfASb1jU5xGSg02UdOm0yvxldj4g/ke6L1i8X2I2hXBofsZR4WTPaqDTEX296 L9j7uNVZzih93xYE+5eU7uTofYnpEIATqhXL1ykrcD5BB/6COtxmsDOtFpG+OlwENcC+ LM+m+WnedFT3UkOqHGwCsYZSYKObmGr1G9BLSMSmEJI9SdNZm0VVnnqyWJmFHXGzfLXh TeebrtlKamPDfBGxM78FhwyLtKWq8x4QCT+JMei+APyrNsQw2QGGUe9smtlcSC0HbW/v /hpw== 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 k6si63987iow.10.2021.06.17.20.38.36; Thu, 17 Jun 2021 20:38:48 -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 S233674AbhFRChu (ORCPT + 99 others); Thu, 17 Jun 2021 22:37:50 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:8267 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231654AbhFRChr (ORCPT ); Thu, 17 Jun 2021 22:37:47 -0400 Received: from dggeme755-chm.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G5jZf0WCFz1BNmQ; Fri, 18 Jun 2021 10:30:34 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 18 Jun 2021 10:35:37 +0800 From: Peng Li To: , , , , CC: , , Subject: [PATCH V2 net-next 2/7] net: hostess_sv11: move out assignment in if condition Date: Fri, 18 Jun 2021 10:32:19 +0800 Message-ID: <1623983544-39879-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623983544-39879-1-git-send-email-lipeng321@huawei.com> References: <1623983544-39879-1-git-send-email-lipeng321@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 dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Should not use assignment in if condition. Signed-off-by: Peng Li --- drivers/net/wan/hostess_sv11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index a18c09d..8dce8b1 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c @@ -340,7 +340,8 @@ static struct z8530_dev *sv11_unit; int init_module(void) { - if ((sv11_unit = sv11_init(io, irq)) == NULL) + sv11_unit = sv11_init(io, irq); + if (!sv11_unit) return -ENODEV; return 0; } -- 2.8.1