Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2001895imi; Sun, 24 Jul 2022 04:09:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sl7HZs6jHwQzw3oZbu8Mb+8oTogU0gFBJZ0W+SA1qdXaxgIhPGAG6sqk6STbQpRXU7f8ya X-Received: by 2002:a05:6402:3551:b0:43a:a5c0:2fbc with SMTP id f17-20020a056402355100b0043aa5c02fbcmr8256586edd.288.1658660964347; Sun, 24 Jul 2022 04:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658660964; cv=none; d=google.com; s=arc-20160816; b=D4weKVqCgOVzZtYXhVVmTJEyAWvokpr+RznCv5Fzuy0jUsYEk9I9S/X/k7qDKvj/BJ dG8LA+PPuzENf+SeVj0uEz/HdD1y24EIYv8FacvXvVYtcaU/EuW9AMcX/Am7lnUPgMJH YW4GdP9AS3dHgOfdoLsSE1lp4slopsZB8eHx5TIUfyguiSUxnNF1Gfo1D3dcLwL2/rAZ zoI0qHwlmkIy2h57FJW60XM0TVl/V8Fb1jlFdJR2dSw3eVsY3Lw4qvNSLklqqwlEyMjk EQQljFQkhTUdYYG61Kpp4awZyekFue/6xn64DRnQEJ/GLDZHpKKgB+d0xuTFv3sMP5SZ x79A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yJW+dt5eAcXnvma6LPfcUwm+T9G0Jk72nagiTEpj6vI=; b=ziDxLc1gj4Fj3kAZLv9G+Wf4YU5I1sLQYzLl9+uDkhLq/yC08y1z17WLzoZctzVUJ8 SwzElBw91fQHYGUhHuMduCce+YnvKTClHVwzmk11gbldej7J3Nbva4DI2UJYblK+l363 Skzvj1bY3RYAwS3Msqf3an4J+8EJ/mm3AAXiHl6rmbnKLymJuaXCkKGzutSeHkKuwWt9 LabR212KLYb4Z5hI+odwLKeHA0Xm1SHtk+61bIbBntwttzo9olOsc1tMWhQ0R3NRhxF1 KZIL+Uwyt2Zw3tu7gBLcmvlsgMHR3N8sLDDUlXXYkmAlSzhjUa/4MQCU/9rDtxsagkgR bEuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="yLzeC/4p"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a17090660c600b007269a26e8a6si9773370ejk.937.2022.07.24.04.08.57; Sun, 24 Jul 2022 04:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="yLzeC/4p"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbiGXLA1 (ORCPT + 99 others); Sun, 24 Jul 2022 07:00:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiGXLAZ (ORCPT ); Sun, 24 Jul 2022 07:00:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F72E64C6 for ; Sun, 24 Jul 2022 04:00:24 -0700 (PDT) Date: Sun, 24 Jul 2022 11:00:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1658660421; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yJW+dt5eAcXnvma6LPfcUwm+T9G0Jk72nagiTEpj6vI=; b=yLzeC/4pyyebwYdzpSZkFLr8Il+lMuUFuK7LUGGU6mIUv5/lY1MjGlN/nTIDVoBit4l1Ep KwBtjMuuA+Uq9P1uFhYY9lx0yUcPmOOWbqpU2VsXRktVLO4+sMLkoRVN06k5ItjiH6TyLB z9iae6Vi8QSiyx58azbqjagnZrq2EWOS4f4cGV+CcRSH5xEwlaMRsXlccyc3utdPSvYJCt lHN6hYaL/PqyploHqzgehRY3qm7x7nUUFfijGp1oRd+4aVX4k59i6AMsTPeFbtLR1ABmF0 uCdzQgUEdswtsQUNxFB2e9QOZN10CxzukAxYRDI4gzV3w5dck1qAa95Db2Ydhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1658660421; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yJW+dt5eAcXnvma6LPfcUwm+T9G0Jk72nagiTEpj6vI=; b=0LOdaRxnm3j48kXMMI0CEXxtTh099dNRsK/7Vx34TziktBEzl6lSDZDbm8jU00YxhQ1LPj pM9rlFrYSihbSQBA== From: "irqchip-bot for William Dean" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/mips-gic: Check the return value of ioremap() in gic_of_init() Cc: Hacash Robot , William Dean , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20220723100128.2964304-1-williamsukatube@163.com> References: <20220723100128.2964304-1-williamsukatube@163.com> MIME-Version: 1.0 Message-ID: <165866041980.15455.8736055814592911853.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 71349cc85e5930dce78ed87084dee098eba24b59 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/71349cc85e5930dce78ed87084dee098eba24b59 Author: William Dean AuthorDate: Sat, 23 Jul 2022 18:01:28 +08:00 Committer: Marc Zyngier CommitterDate: Sun, 24 Jul 2022 10:54:44 +01:00 irqchip/mips-gic: Check the return value of ioremap() in gic_of_init() The function ioremap() in gic_of_init() can fail, so its return value should be checked. Reported-by: Hacash Robot Signed-off-by: William Dean Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220723100128.2964304-1-williamsukatube@163.com --- drivers/irqchip/irq-mips-gic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index ff89b36..a1f6d95 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c @@ -734,6 +734,10 @@ static int __init gic_of_init(struct device_node *node, } mips_gic_base = ioremap(gic_base, gic_len); + if (!mips_gic_base) { + pr_err("Failed to ioremap gic_base\n"); + return -ENOMEM; + } gicconfig = read_gic_config(); gic_shared_intrs = FIELD_GET(GIC_CONFIG_NUMINTERRUPTS, gicconfig);