From patchwork Tue Aug 18 13:36:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 11720909 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3A5414E3 for ; Tue, 18 Aug 2020 13:36:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 699FA206B5 for ; Tue, 18 Aug 2020 13:36:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iLuf5Pc0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XeI/bnsF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 699FA206B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uIBSPB/1HsGPQojYY7qWaTkBEGbo7uW3oee3AH7YynU=; b=iLuf5Pc0Rm6gXd3leZXtu2MOA 3qGdZt99eBFJS9+rwF0hePm8OPE7mr/2PGU5dXIcAZDdsTUKPPVvK0mLD7/OPBqpptoVw7hQmM8/R f9itUAtLmZvQoAHAvUhemVLwPZOkhCXFG6/NlspfwpEqB0baB/s75KnVZuFe70XOhhjBwyeEqhqq7 NvqhIuqhOO03h64+c+FCMr8hbI/V1XSJXzX5OtPXjBOrqooOXMQXmAS8bNnN/KUo6G/zfJoHsejqA BicG/RtUoXxKXxC0fVzlXK4MhWAEJW+bghoLWnLw3JHZ0y8ZyJQC0m4ZskgXT7nF54o7Im0FK0COW U4TdylKig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k81mq-0003Ah-Pp; Tue, 18 Aug 2020 13:36:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k81mS-0002zX-Ho for linux-arm-kernel@lists.infradead.org; Tue, 18 Aug 2020 13:36:04 +0000 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 6452C206B5; Tue, 18 Aug 2020 13:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597757758; bh=axA6OGzpfyAZ/ezh8rhvucD/432ettQbcxBBNuhqQS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XeI/bnsFVetWO5lL/OkgNUHswpSU5zOg2XvqCYrdWkntnL+afrwkThFU8cKWd9s7Y OZIBPPYoklGiXzclyOpu6hpmv2GSI22XdYfjjjwmbqg/tdmYWf74w2VXe3qrlHbbwc 4tCPlMNCZG/54dTWiilZEEMvI2yktQU+vTu+iQ2s= From: Greg Kroah-Hartman To: linux-media@vger.kernel.org Subject: [PATCH 3/7] media: exynos4-is: no need to check return value of debugfs_create functions Date: Tue, 18 Aug 2020 15:36:04 +0200 Message-Id: <20200818133608.462514-3-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200818133608.462514-1-gregkh@linuxfoundation.org> References: <20200818133608.462514-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200818_093600_724241_D7CA16A8 X-CRM114-Status: GOOD ( 16.07 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Kyungmin Park , Kukjin Kim , Sylwester Nawrocki , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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: Kyungmin Park Cc: Sylwester Nawrocki Cc: Mauro Carvalho Chehab Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/exynos4-is/fimc-is.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index a474014f0a0f..019bb47df915 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -756,18 +756,12 @@ static void fimc_is_debugfs_remove(struct fimc_is *is) is->debugfs_entry = NULL; } -static int fimc_is_debugfs_create(struct fimc_is *is) +static void fimc_is_debugfs_create(struct fimc_is *is) { - struct dentry *dentry; - is->debugfs_entry = debugfs_create_dir("fimc_is", NULL); - dentry = debugfs_create_file("fw_log", S_IRUGO, is->debugfs_entry, - is, &fimc_is_fops); - if (!dentry) - fimc_is_debugfs_remove(is); - - return is->debugfs_entry == NULL ? -EIO : 0; + debugfs_create_file("fw_log", S_IRUGO, is->debugfs_entry, is, + &fimc_is_fops); } static int fimc_is_runtime_resume(struct device *dev); @@ -853,9 +847,7 @@ static int fimc_is_probe(struct platform_device *pdev) if (ret < 0) goto err_pm; - ret = fimc_is_debugfs_create(is); - if (ret < 0) - goto err_sd; + fimc_is_debugfs_create(is); ret = fimc_is_request_firmware(is, FIMC_IS_FW_FILENAME); if (ret < 0) @@ -868,7 +860,6 @@ static int fimc_is_probe(struct platform_device *pdev) err_dfs: fimc_is_debugfs_remove(is); -err_sd: fimc_is_unregister_subdevs(is); err_pm: pm_runtime_put_noidle(dev);