Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C103DC4332F for ; Mon, 12 Dec 2022 05:15:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E0FB10E159; Mon, 12 Dec 2022 05:15:12 +0000 (UTC) Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01DD710E159 for ; Mon, 12 Dec 2022 05:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1670822100; bh=x5u9SJrKs9RCN7DJjxjkshnIpEyM3daCRvIk3xX2wys=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=LhVI7lEs5ex1cJrAazHrjbJhZ587taDZWhLU+3AdgR4bBDEJT4WqhS71jroMcdBfg 3QCwd2iDIolqkaiy9j6HjpUP4CnRlDUWrzQ1bGNnDJCDbHUZsGkDzu8te3mP4I+6nZ LyEhKlfvM+z/zjpZtp32BhlOQoinrB3EutvetghM= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 12 Dec 2022 06:15:00 +0100 (CET) X-EA-Auth: DvjCgCp6LuEa0s9e8QuaRL/+RW71CgdJA4TmvT0UWMwsLAcaKmvaw6SLqVp/hioJynZ7EPHqhjxOL0A/P/naAi29VUuxTYAv Date: Mon, 12 Dec 2022 10:44:55 +0530 From: Deepak R Varma To: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/tegra: sor: Remove redundant error logging Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Praveen Kumar , drv@mailo.com, Saurabh Singh Sengar Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma --- Please note: I was not able to build this driver since I did not find the DRM_TEGRA option in menu config. All dependencies listed in the KConfig are enabled, however, I was still not able to find the DRM_TEGRA module in the Graphics-Drivers list. Since the proposed change is known, minor and obvious, I am sending in this patch without build testing. Any advise on how to enable the DRM_TEGRA module in menuconfig selection list will be helpful. Thank you. drivers/gpu/drm/tegra/sor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 8af632740673..ceaebd33408d 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3799,10 +3799,8 @@ static int tegra_sor_probe(struct platform_device *pdev) } err = platform_get_irq(pdev, 0); - if (err < 0) { - dev_err(&pdev->dev, "failed to get IRQ: %d\n", err); + if (err < 0) goto remove; - } sor->irq = err; -- 2.34.1