From patchwork Thu Jun 13 18:37:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10993455 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19BFD924 for ; Thu, 13 Jun 2019 18:37:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0954822A68 for ; Thu, 13 Jun 2019 18:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F15F422B27; Thu, 13 Jun 2019 18:37:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9374B22A68 for ; Thu, 13 Jun 2019 18:37:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbfFMShc (ORCPT ); Thu, 13 Jun 2019 14:37:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfFMShc (ORCPT ); Thu, 13 Jun 2019 14:37:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E27C62133D; Thu, 13 Jun 2019 18:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560451051; bh=U0plP2qgDJJQV2UXAiZ0BVK1gPAuJp5gn+oFC0ZI3vg=; h=Date:From:To:Cc:Subject:From; b=kqt0bR4W6uDEdxXE4pQpoWrQJF44KN+rlPjxhQHpbQX91+CpReL3RNR2qybq9LGlk Nm9avHCTJFV2jK3XNMyav5AryNyskCLHnpvUd4ouuqBcmRTp4buz5yuPnsIIyDtnec Q20RbDSQUdD/oWKU/3fEx4qMRN6GuaYz9IWMv0Yo= Date: Thu, 13 Jun 2019 20:37:29 +0200 From: Greg Kroah-Hartman To: Zhang Rui , Eduardo Valentin , Daniel Lezcano , Florian Fainelli , Ray Jui , Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org Subject: [PATCH] thermal: bcm2835: no need to check return value of debugfs_create functions Message-ID: <20190613183729.GA32085@kroah.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/thermal/broadcom/bcm2835_thermal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c index ba39647a690c..3199977f1e73 100644 --- a/drivers/thermal/broadcom/bcm2835_thermal.c +++ b/drivers/thermal/broadcom/bcm2835_thermal.c @@ -123,8 +123,6 @@ static void bcm2835_thermal_debugfs(struct platform_device *pdev) struct debugfs_regset32 *regset; data->debugfsdir = debugfs_create_dir("bcm2835_thermal", NULL); - if (!data->debugfsdir) - return; regset = devm_kzalloc(&pdev->dev, sizeof(*regset), GFP_KERNEL); if (!regset)