Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3419329imm; Tue, 17 Jul 2018 04:41:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfWnDwt8Y+J/OZNRmvmHRmRe2qWqeI1VN/Y3dBzz8FZz6rFy0O7YVqkz2vSDH1ThUqmZsC9 X-Received: by 2002:a17:902:5a3:: with SMTP id f32-v6mr1301747plf.286.1531827661855; Tue, 17 Jul 2018 04:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531827661; cv=none; d=google.com; s=arc-20160816; b=BWTjCcK/x+jq1heKni4q3164Az1K96O+wXdfpqx0+8ZbLMqjHqxTxMlLK2VOQL9yE+ q/gz4x2kz3MPqzvlto1cztM9rhcY/5tUk+aZCSDA0i4LS8oB6E6//j43ikCSyFlJumqv 6i7dFBl7pghCi+lSIMOXfSNLpGDpkfSA2QBnxoow/eBE8/b05rpzfFIPRXlBa95MqVbe PosfKGz5u/RJx0gtJDPjGt/RFieLszX3NGMnhocm/NWr8E23aDdRcEsmhav9MFxc9SrU c+WpacI0OCo0GC/gG2gNjVJ0U++vLXohU+ZcNrwEUDEiuD458IQ9rVfYMxblgNn0KnmE aQZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=dL5rfgfeRe7gU90zPLynX+YylH/dHEC+ozS9t2DjUms=; b=hN/ey/bbiEuWFkLYzP367sE+Yds2+yXYXrQm6VD5CGpwIZzAvGGC55f7DtyT8Mm3GT P8jQ5oNLJYTjuW9V7qSkW9yasPVgObgWA7C8awMoygaGJlD7XsKi5M5GOSM7bAZ/EZYU y8U6KRI+vHgI2t6shciouuyyddP3b7TK2H8e/5lUwsxoTMwCK49mc0PI91u5swwhJV1d +xYdbXslbBOgv94BQgvFDXX7XqKPz+HFqEYgapJn8jgIK9Jg8V159znEQYVFPw4aSlcH iHmrq+GT56qm25m4iJO1DE1WnMX3jGDJ6hu8a7++M+3x/7bToXNCf3EKOjaiInVr1G3Q xg3Q== 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 c21-v6si711315pls.407.2018.07.17.04.40.46; Tue, 17 Jul 2018 04:41:01 -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; 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 S1731137AbeGQMMT (ORCPT + 99 others); Tue, 17 Jul 2018 08:12:19 -0400 Received: from terminus.zytor.com ([198.137.202.136]:34405 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730780AbeGQMMT (ORCPT ); Tue, 17 Jul 2018 08:12:19 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6HBdx7u1495288 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Jul 2018 04:39:59 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6HBdwCq1495285; Tue, 17 Jul 2018 04:39:58 -0700 Date: Tue, 17 Jul 2018 04:39:58 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for RAGHU Halharvi Message-ID: Cc: raghuhack78@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de Reply-To: tglx@linutronix.de, hpa@zytor.com, raghuhack78@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20180717102009.7708-1-raghuhack78@gmail.com> References: <20180717102009.7708-1-raghuhack78@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq() Git-Commit-ID: d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Gitweb: https://git.kernel.org/tip/d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Author: RAGHU Halharvi AuthorDate: Tue, 17 Jul 2018 15:50:09 +0530 Committer: Thomas Gleixner CommitDate: Tue, 17 Jul 2018 13:35:44 +0200 genirq: Remove redundant NULL pointer check in __free_irq() The NULL pointer check in __free_irq() triggers a 'dereference before NULL pointer check' warning in static code analysis. It turns out that the check is redundant because all callers have a NULL pointer check already. Remove it. Signed-off-by: RAGHU Halharvi Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20180717102009.7708-1-raghuhack78@gmail.com --- kernel/irq/manage.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 1f8be33572a7..a66c58f91bff 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1570,9 +1570,6 @@ static struct irqaction *__free_irq(struct irq_desc *desc, void *dev_id) WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq); - if (!desc) - return NULL; - mutex_lock(&desc->request_mutex); chip_bus_lock(desc); raw_spin_lock_irqsave(&desc->lock, flags);