Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6241494imu; Sun, 2 Dec 2018 13:17:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/WIJxthMVhmwrXMZC6LECAfL2uhxMaSW1pvvDPj0TYoQc0Zg5UrF/NDso1F/dBAK1UgXoQp X-Received: by 2002:a17:902:6e16:: with SMTP id u22mr13341365plk.175.1543785429642; Sun, 02 Dec 2018 13:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543785429; cv=none; d=google.com; s=arc-20160816; b=fRPINJkKKet2c+wo4JQzi4gJESH9x8u/hsXZfWjZ0R/qQ/WDeGciOfzyiVChugNH8/ pEYjmP183woeEhkwXqXPN6otekjmAEThGSkqQeUoiSDrGJJLRscWtzOm69bLPiEEuF1y VOrFy5l2sxHhqW3+cs+91lz62m24TA6UlKGuKGL439mcTVpyGRyJrykHouiQnDtZ+Yfa KvsZaOfIlQGSJyQiHqu9xOCwYFPSVek/o15XBveRq5v3e2igRpzDI3MbIIEgL+KJ/apC uV+QVoDrBqOzLR1sTC2cGs+D3J48lEpxnhkvhYifhqIuXssvBLoZLo0lY2MsPfvAElFf mbQw== 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:user-agent:date :in-reply-to:references:message-id:mime-version:to:from:subject; bh=AvSOeF+0wpAvpSE1UgpEv35Vd/zRPjpwDh5/8txOpJU=; b=me95+rGvg6OmDfG0mxymLA1ia5PuhCG9iKv/n9/4eqhvgzNjcKFi7lHoIjUAiQScWr UcS5NHt1lyHKjl6sL4vi0DYHE2zR7fRgLqdrIijAmBjEacjnchIHUHhiYTf37mFtYiPb DYCXyPSxZ0bbmab/chz9QvM7Pdgw+gcnx6pCp1Wp9kZWEC1TxPy7DCSqfJSby0gMM1B4 Y4nrlFCzOAQrDjo/4UyBX0ofpsteH1bKFRQ3YJm4UsPo/L6iTKeU2UKD59Bb2hNTVFLi QyfH2aFWird7YBgQZIpb6jOCtudp/LfGTCQlPBESDrgNyw+XUoJecPnLsMKda8bpkzLY 2o5A== 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 j5si10629539pgq.82.2018.12.02.13.16.55; Sun, 02 Dec 2018 13:17:09 -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 S1726001AbeLBVQB (ORCPT + 99 others); Sun, 2 Dec 2018 16:16:01 -0500 Received: from www17.your-server.de ([213.133.104.17]:57708 "EHLO www17.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbeLBVQA (ORCPT ); Sun, 2 Dec 2018 16:16:00 -0500 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www17.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gTYlp-000165-Ur; Sun, 02 Dec 2018 21:55:17 +0100 Received: from [2a02:908:4c28:3f60:fff6:43c5:695c:41d6] (helo=localhost.localdomain) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gTYlp-0002h5-Or; Sun, 02 Dec 2018 21:55:17 +0100 Subject: [PATCH] scsi: qedf: NULL check before some freeing functions is not needed. From: Thomas Meyer To: QLogic-Storage-Upstream@cavium.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 X-Patch: Cocci X-Mailer: DiffSplit Message-ID: <1543760930052-271366275-12-diffsplit-thomas@m3y3r.de> References: <1543760930050-1499171309-0-diffsplit-thomas@m3y3r.de> In-Reply-To: <1543760930050-1499171309-0-diffsplit-thomas@m3y3r.de> X-Serial-No: 12 Date: Sun, 02 Dec 2018 21:52:11 +0100 User-Agent: Evolution 3.30.2 (3.30.2-2.fc29) Content-Transfer-Encoding: 7bit X-Authenticated-Sender: thomas@m3y3r.de X-Virus-Scanned: Clear (ClamAV 0.100.2/25173/Sun Dec 2 15:13:44 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2935,8 +2935,7 @@ static void qedf_free_fcoe_pf_param(stru qedf_free_global_queues(qedf); - if (qedf->global_queues) - kfree(qedf->global_queues); + kfree(qedf->global_queues); } /*