Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3830217ybb; Mon, 6 Apr 2020 17:02:55 -0700 (PDT) X-Google-Smtp-Source: APiQypLFSOA43VfqMusVZq2hN+F1CYcGNDdrof42QZ2NhPPDjK+zXSaYnvNqaB6+XKd4mRyluXLU X-Received: by 2002:a05:6830:2411:: with SMTP id j17mr19199188ots.257.1586217774884; Mon, 06 Apr 2020 17:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586217774; cv=none; d=google.com; s=arc-20160816; b=GcoqoN+/l9Dti24qQOYSw5LkNjsy4vmBalepbhUovJ2qkivP7hNuMU0gGCG6hYd/Bk bIAsLgMUCIWZm8aPFq4hgYDVi7uSBouscVeW6BV5DXdXDeDs5SlBlzvUajvLMex9PcGH QYXFHSc9OLr/g0soFhWA87yHIktLvSFrsw9OnlqDth6hJolAOzYi92UuKw2VwsZgZ3iE nuN6WCmRxPSuys2xPjVmfE5pOZ/mkQQJDw5ZKS7zOt8tTwlPJjrj3YcrbzLVTMTEnR9z q168ew5+ONnM2DCNWbcAkXj80/KJkZ+ZQW0vSJi8W2/nrS6Uxcc7VQZp6hqns491xwuS 1jOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AGYH8D3NzrblnMBo1EPF8zR3Y1a+CNhw1Nm4M39A4Q8=; b=Cusuu1fS8adjKNG3x1RG4ORfTX/HD6i5R5yRxZ85rvX5O3WHwMjcMgvk1TTes7/xsI p4rZDKBH6D+92bVVYsHFakawhQDgzMuhi4BifQ93Yo3vYQJT4pdaxaVgSmU+QLCa/qu0 VNlksIKqdDfExPUdWOYqaolsvV8iGF16l5hyGILNLT767cVhvrnhtgrHEhIDvLkUjkGe v0M8Cef09OvGg1AUMJXS/SegwZe48vVy4CN1qb1oMhpHHOXBwVcDadPCEGdF2LDUyRUb Q09PsabFcYq0mE2b0KFZwHcb+8wWzVcGqq2IHFtZ2QIsEgXRFYav6Xl0e66BI3thpLaz zjiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N5v7e8Sc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si483100oob.73.2020.04.06.17.02.43; Mon, 06 Apr 2020 17:02:54 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=N5v7e8Sc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727476AbgDGABp (ORCPT + 99 others); Mon, 6 Apr 2020 20:01:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:35042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726965AbgDGABk (ORCPT ); Mon, 6 Apr 2020 20:01:40 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D14862082D; Tue, 7 Apr 2020 00:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586217700; bh=T/a03JFRVwZf26cJQ8+4XA7GcZj1JeU8Ggit0HX5RJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N5v7e8Sc4OtOIdSq3r/6kL5UlV7YLVpgjrFbz8ZlYrKA02SWlTIven8+JxA3U98uq wbIgpQ6utsbYCVEY+UwcbpDSoTJ+f6iYXqvw4Q1Hn7Ma26sgr5+hGspXm2s8nX1e1i 5miGhaC8GQfC+spiNOz+N8N1S3YD7YA/DaL8R2nw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xu Wang , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.5 33/35] qlcnic: Fix bad kzalloc null test Date: Mon, 6 Apr 2020 20:00:55 -0400 Message-Id: <20200407000058.16423-33-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407000058.16423-1-sashal@kernel.org> References: <20200407000058.16423-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Wang [ Upstream commit bcaeb886ade124331a6f3a5cef34a3f1484c0a03 ] In qlcnic_83xx_get_reset_instruction_template, the variable of null test is bad, so correct it. Signed-off-by: Xu Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index 07f9067affc65..cda5b0a9e9489 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -1720,7 +1720,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d ahw->reset.seq_error = 0; ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL); - if (p_dev->ahw->reset.buff == NULL) + if (ahw->reset.buff == NULL) return -ENOMEM; p_buff = p_dev->ahw->reset.buff; -- 2.20.1