From patchwork Sun Dec 11 13:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 13070592 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 14D0BC4332F for ; Sun, 11 Dec 2022 13:55:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E94610E130; Sun, 11 Dec 2022 13:55:29 +0000 (UTC) Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2C1B10E130 for ; Sun, 11 Dec 2022 13:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1670766913; bh=xq+tOsyd0WnEBYZsDftkiZ/K0hXxhKqmak3ozClnAhA=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=Lw7qSXIeqY0zeGmSKrp3dOZ2ty0Y08YgUu/NU5OcVnZmRzmnrbv3QgL2NPJrD69rM zqjp4YLX3kM8FyRwyTwpBfS+vT/ECHRIHWCBGJhzXIk0YPdsMGeM0+icZpxRXX6Lnw dDZZujg51h0XESzbuOdd96640l5W2EFTrqla60nI= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sun, 11 Dec 2022 14:55:13 +0100 (CET) X-EA-Auth: 1vJpOd6xvyZUc0g7UMKSJAb/DUIrntROzP0Ci/lss0NuJBvm6qAzgGmuTPxapEaAUk3yo/Bjo0fCa7hkbNJRkqgJMiaiOOVj Date: Sun, 11 Dec 2022 19:25:08 +0530 From: Deepak R Varma To: David Airlie , Daniel Vetter , Orson Zhai , Baolin Wang , Chunyan Zhang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/sprd: remove redundant error logging Message-ID: MIME-Version: 1.0 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 Acked-by: Chunyan Zhang --- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.34.1 diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c index 88f4259680f1..db0bcea1d9f4 100644 --- a/drivers/gpu/drm/sprd/sprd_dpu.c +++ b/drivers/gpu/drm/sprd/sprd_dpu.c @@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu, } ctx->irq = platform_get_irq(pdev, 0); - if (ctx->irq < 0) { - dev_err(dev, "failed to get dpu irq\n"); + if (ctx->irq < 0) return ctx->irq; - } /* disable and clear interrupts before register dpu IRQ. */ writel(0x00, ctx->base + REG_DPU_INT_EN);