Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1054602ybh; Thu, 16 Jul 2020 01:42:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznmof8DpJdx2JYKlMUDyoFKsNMSVkTO4hI76D4sHOviFqB1j9Q+lsSiQ6JCjuSGLfWurYJ X-Received: by 2002:a17:906:6b0c:: with SMTP id q12mr2825209ejr.525.1594888933682; Thu, 16 Jul 2020 01:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594888933; cv=none; d=google.com; s=arc-20160816; b=NUWJrbgGptgF37iVVtTeO65G/76jMEw6XelWlepiOsekKpwIFeu9I5AC10erhuEfbk +1ku99YBufZ0aXr3afCPiKw33nYKBPPrRTdMROizENv2byiaDWRs43xyUtBplNyBBDO1 5EvWjDJewezcogtE/m/jhZMyCOZCoDTxbbz0uphsoQyQeIUbstJ2bJ7RxjBVPSu7Q4hc YtZexRpcHxb9yyRmYAEYUG3m7EDoxiaHFMw3wo4j9gMUI+2ynKDcr04AWdbgRIfnLR0l 3280KKTQ1BZk5Sjmr1GW9WHEXIlx7IutAysi4Tf6V7v97mEK4kPeuK+HsGjvDDatsRNP Moqw== 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 :message-id:date:subject:cc:to:from; bh=Y7PZ4eK/M1jyvdxmk+SpEpD84Hpf+k0Oyvtjz+6SzTk=; b=G83wW42OIsZkOE8rHdsJT8QBRbH5BBRiochhhrXk183ct3ujSDpnlAWRfB6Q/d+Trw r5Ue2sWAe39mE0jnyEcujVnGRVuonEs1xUnMshygOShMHANKwuQloRRkipntfawjpaUv 8LvDuOp4MLle6VZIEF0Ntor/5npESu7N7s4BsrqyvVmglE/mC6ckWoM5Mtey24YS/JNa Ze2tGwqsGlq3RKKl1BZSAkRn23SErTu06WoGglrg7zJgD0770J0D9X4Khgg64CJXyB7r Kuk9IGcqnDvKVRuu02A1CnsmgF4IoHwiX8NbljtelS4iLJ3n9EmOZ3TS71NJ+7oWr4lX MFIg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck29si2686486edb.236.2020.07.16.01.41.50; Thu, 16 Jul 2020 01:42:13 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727096AbgGPIjY (ORCPT + 99 others); Thu, 16 Jul 2020 04:39:24 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7756 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725921AbgGPIjX (ORCPT ); Thu, 16 Jul 2020 04:39:23 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 88FF275C51A9C3B9AFA4; Thu, 16 Jul 2020 16:39:20 +0800 (CST) Received: from DESKTOP-8RFUVS3.china.huawei.com (10.174.185.226) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 16 Jul 2020 16:39:12 +0800 From: Zenghui Yu To: , CC: , , Zenghui Yu Subject: [PATCH] genirq/irqdomain: Remove redundant NULL pointer check on fwnode Date: Thu, 16 Jul 2020 16:39:05 +0800 Message-ID: <20200716083905.287-1-yuzenghui@huawei.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.185.226] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The is_fwnode_irqchip() helper will check if the fwnode_handle is empty. There is no need to perform a redundant check outside of it. Signed-off-by: Zenghui Yu --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index a4c2c915511d..155460fc0147 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -142,7 +142,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, if (!domain) return NULL; - if (fwnode && is_fwnode_irqchip(fwnode)) { + if (is_fwnode_irqchip(fwnode)) { fwid = container_of(fwnode, struct irqchip_fwid, fwnode); switch (fwid->type) { -- 2.19.1