Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp688269pxj; Thu, 17 Jun 2021 11:25:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4E3cOL7O7f9MtDGtt23kKiV2elrHncDJIExs226TNxupe+Wxbl8o11soQQPIgLGVMlJfp X-Received: by 2002:aa7:d801:: with SMTP id v1mr8539963edq.349.1623954337234; Thu, 17 Jun 2021 11:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623954337; cv=none; d=google.com; s=arc-20160816; b=BnvQMiI5Ida66k/zLg/3lzk4qP2R5a+vu+McKLMyaqgV/NNB0hEf28aCQqoEXCrFXn otj+5u3msfJOi5FvA3FYa6+BoWLMTwJay2VhqrQg2x4cwDL0wycQdmQr90B1DU0e6N5b fnnmdfFwhlUKbuXnLQoAXiJKh2JOG9uefZnynwPUiTv/CtozFVaWb8W200vG+oPnfG46 y1EJH3olNX7QrqWzNkUvIObwDMWafwlSl8Kpe7xB2w6y1IZixEKEuE1+CNYYlm3fpxkK KbFLMf9poNUIcx8Hyj1GbGJ9i1+fqx2ZR99anQh89tGfrMo7KBf9o6wcduW8+2JCvTjG +KWg== 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=VylMqzRtWSCOtNhQ4Pzpg/y5WRmlmQVQ/sPUHpuWLny5qyZRTBc3OusUMRnLuBwjFb OY4fZXaVm1Wh9LMqjBzHhbp5FhfKxEFmyvoYRVBSgenULcy0ezbBoIoy73TrUVs1hhTf As1hDOTPIsmLxbSFSlgX/jcXwie/Ebox96Of/zzbMrQcNW02dUkipRtMIKmzDpM7cZSj VsaarLJR/5N5IZiFWb3j0YgYgw16j0Qtl1s02fPJzSSmq40qlV3UltKl2AzZs9nLlBa3 B0EHrIfA0KVNFBIblZQSHF+FJ2Rn8P7BTH1f3la69gzvVZKPK6/cGpmLlt+ky+uwsnpQ lMWw== 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 z21si6297108eja.498.2021.06.17.11.25.13; Thu, 17 Jun 2021 11:25:37 -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 S233042AbhFQO7W (ORCPT + 99 others); Thu, 17 Jun 2021 10:59:22 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4959 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232160AbhFQO67 (ORCPT ); Thu, 17 Jun 2021 10:58:59 -0400 Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G5Q6T1t42z70tQ; Thu, 17 Jun 2021 22:53:37 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 17 Jun 2021 22:56:47 +0800 From: Peng Li To: , , , , CC: , , Subject: [PATCH net-next 2/6] net: hostess_sv11: move out assignment in if condition Date: Thu, 17 Jun 2021 22:53:31 +0800 Message-ID: <1623941615-26966-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623941615-26966-1-git-send-email-lipeng321@huawei.com> References: <1623941615-26966-1-git-send-email-lipeng321@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 dggeme756-chm.china.huawei.com (10.3.19.102) 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