Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5458787rwb; Sun, 11 Dec 2022 06:33:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rhqejHz4QWKqf7fy2QAel5D6nqOoUA3to5J9I0dSJ5ZyYnPuwrfxSSc7dXZDJVqKnCAYD X-Received: by 2002:a05:6a21:9212:b0:9f:2dd1:c2bc with SMTP id tl18-20020a056a21921200b0009f2dd1c2bcmr15903983pzb.49.1670769200624; Sun, 11 Dec 2022 06:33:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670769200; cv=none; d=google.com; s=arc-20160816; b=tX9YX1ScgxdV4VPEcb4Sb8NbbsAK5MhkeyOuj2VQgy/DYZGoamZrgJimXIVcGhukkr v/dw2Dpc6V+JFcP6aRO/LeTazWUSaEcvL5BatbDtmHIWLIrPYIebdMTqRIlaMwf6gTp4 rv22w/J9IuzTrHriawfwrEnksIE0fczJFUhAl2mUugHQtm3Zhyyl2ZF3YIOT+qEH4G92 4SIMmhmzBhKI93S4BPSELnG5n0LA8Bk2sYH1LZhhfsNGGK9W8VC2OdM9WWtGSubCwkY8 6L88FNSDYKCjMkI5riHNsAErMlWqwJgsnhUnr3roajUQi/kvMfqzknqbAo4BExnKazBz bRcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=Z3aLbqmT/nbwosbVma9CyWWzC4rITcyhzveYgD0OWXM=; b=i082+LBSVazDgPoUjal2I0e5SNRTrYO7HuK8MgXQz8xSxqWb5Vp08Vd8LKPfkIFbSn rm5C1zQaxHazLdhjs2zIFQgi2QCCBSuax2mK7ijX1TSe1ouOOHsJHmAWsCC4O/S4+iDr rptOucUzm708jkaVbt5N4cBviDlE/fT9pI9lu0wAciJyp2Assj7vlgJAqzoUfJzvmhsJ ST6pl5pn0RmW1/WLaFsv+t8MaqiUVDMUe9eBTnuvxOkYC20Fml79GGOPpOB21PjiuvbF JnyYrjibWQfg97sYFwB40yXZYG2MOj/SMIqTDibKHlVhOXmt5+sEIFXcgNQj2jip8IQc 82pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Lw7qSXIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e90-20020a17090a6fe300b00202c7f4631esi7231579pjk.19.2022.12.11.06.33.06; Sun, 11 Dec 2022 06:33:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Lw7qSXIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbiLKNz2 (ORCPT + 76 others); Sun, 11 Dec 2022 08:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLKNz1 (ORCPT ); Sun, 11 Dec 2022 08:55:27 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280BDBE0F for ; Sun, 11 Dec 2022 05:55:25 -0800 (PST) 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 Cc: Saurabh Singh Sengar , Praveen Kumar , drv@mailo.com Subject: [PATCH] drm/sprd: remove redundant error logging Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.34.1