Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2698025imu; Mon, 19 Nov 2018 04:50:08 -0800 (PST) X-Google-Smtp-Source: AJdET5e8kGuVVXm06xTpiWu9kVkWYBSXkjh4FUDYzO5mlCU/VAVIAy+LtOfxQi04ZPzZTberHqwH X-Received: by 2002:a63:1a4b:: with SMTP id a11mr20126362pgm.254.1542631808825; Mon, 19 Nov 2018 04:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542631808; cv=none; d=google.com; s=arc-20160816; b=Ja4cx2xslnhi6AsGm1TaB5zO683MA+HGXaxgph+xImAd8Gwu+9n3oM47zrm7rVM+YQ NQNO89V5JnMLuf7myeaUGd2i1GaVJv1zT1PiWy2tYzVeHPrBvUv+/RlpX9aGfE9Gg/Mn Nd0S/2wE5Lw6IuP8pRJUtXXPQxOFl1f4ZU6gp4/s5UX9VSh8HIQY/RR4EPK295z90ern Thl4GE3//Mkdb7FyeuXoMfog5u7UhEZvbgc0oPZ2Ch1Mi0vcFu+qdH0oFALfKUC3hlM7 JJz/XJUzAMoijSUTGCb+F/KI7rj0XsVS9nb2L1VKpYNhd/ehI2XFIWs3Q49QFmUs3U60 wsYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=DP5juwyjRo2hkWSrL9N+MAvcwqXaoPmepPehCaHBAXc=; b=T4bf8K3Tv66Z4D5ig6oIzfs6/mAJUyPDTUubkIYavoFZXzuAYbpNJi+p7s1t33yn2U qACK/v4yzXqjI6CNOCZpltk6Yrq9jYKNd2mt1iOEvu8EmP6d1pUTUUCF2w3hYlLg4Hi/ l1mAHvLjgDVsjFQ8r7AmpRcIVnsia63DYVkNq6w0X1be1a9Wc+y0G+NfF3iB2N8EymGS VitxbAxkLAuboLx4GS2S6NyjYcFwYM4M87ec21O4Lwb1I4A/2JIfkjeENN+yuiinRtG+ JkgWxuEYzTbUPaIIkE3azQNdejJiaFiXnVo6KKgvGaH+MgESX8Xou0zG/RVkikhTkiC+ 9B2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16-v6si4167570pfm.39.2018.11.19.04.49.54; Mon, 19 Nov 2018 04:50:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728947AbeKSXMO (ORCPT + 99 others); Mon, 19 Nov 2018 18:12:14 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15118 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728846AbeKSXMN (ORCPT ); Mon, 19 Nov 2018 18:12:13 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7E2462D9C7F2B; Mon, 19 Nov 2018 20:48:39 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Mon, 19 Nov 2018 20:48:33 +0800 From: YueHaibing To: , CC: , , , YueHaibing Subject: [PATCH net-next] e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait Date: Mon, 19 Nov 2018 20:48:19 +0800 Message-ID: <20181119124819.15860-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix a static code checker warning: drivers/net/ethernet/intel/e100.c:1349 e100_load_ucode_wait() warn: passing zero to 'PTR_ERR' Signed-off-by: YueHaibing --- drivers/net/ethernet/intel/e100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 7c4b554..736115b 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -1345,8 +1345,8 @@ static inline int e100_load_ucode_wait(struct nic *nic) fw = e100_request_firmware(nic); /* If it's NULL, then no ucode is required */ - if (!fw || IS_ERR(fw)) - return PTR_ERR(fw); + if (IS_ERR_OR_NULL(fw)) + return PTR_ERR_OR_ZERO(fw); if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode))) netif_err(nic, probe, nic->netdev, -- 2.7.0