Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp951491pxp; Wed, 16 Mar 2022 22:25:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFz7AkIjChPXOtK/UoG8vMaTXfjSND22x5m8UpBSZm7fwWExfbwc/y7xXqvPIn5bHSH2kL X-Received: by 2002:a63:f055:0:b0:380:f88a:9e2d with SMTP id s21-20020a63f055000000b00380f88a9e2dmr2357466pgj.596.1647494719120; Wed, 16 Mar 2022 22:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494719; cv=none; d=google.com; s=arc-20160816; b=pEYI+ELD5gzmDtBk4aCntYSQfU6NHs8sViIfgfwB3lTXy31jMO/7gj/U2wHaBorcMh xfSfrhPF/hmsgVzMcm36q+MEvmOsWFpfemZyng89WD3TGV2XkINXM2s2n4UwY7gMk/bz WEfb95q9WBCuPyhwg3Eqniwc6M/+3FQmKs9npAnpESSL80VeCJai1aedRN8zi5tCV/6b RVGPTx7bdv7JdkeeIkUNP0LEp05T/PeLFgm2c5L9GelA+z/Ntn517ETmS79VUmz4fwVM Rvw5wZzAQWFz8GrChaYmlpoHq9LMwr1sKMe9Gwp4SELKW/sCcVDDCokaJX76g69hDRlp SqOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bePHSdvD47tVThEpJKPfiFh9pRjNEYShdx88jfWKmLA=; b=HFkmDahLy606+VlEFDyz6ASLBiXDnSYcvFqOhSRSc/dxpVSOv7x4fWJZEel/nU3uAX OSQo3t+mPpDj/Mm047L8qdVdUmFj/1ATrsMZcwWuBgj7de3qsS9QiyAZir5P14doIuW3 L2QD2gN2gnLY6yPp5UBhv9u6O1NAUF8FzYrBmMhHusYiFkr8I/oS1G5L5OFJqsTnGE92 ghllIKGotZHAOLWy5leiXD/ZCT3EH21kjmwGMrSSvw4XOqGTn8lSgBKdP/P7/8bmRrFl POvT0APeZyIOAKVrBUbcNnL42QH4cfTNULfJPmSkz7fZSulryfTNINcPdLtTEZZshYdL cLyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g9-20020a17090a4b0900b001bd14e03093si1331019pjh.107.2022.03.16.22.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EBF6D241B6D; Wed, 16 Mar 2022 21:32:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345859AbiCPAPc (ORCPT + 99 others); Tue, 15 Mar 2022 20:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344418AbiCPAPa (ORCPT ); Tue, 15 Mar 2022 20:15:30 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB3B91CFF7; Tue, 15 Mar 2022 17:14:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0V7JcKdl_1647389652; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V7JcKdl_1647389652) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Mar 2022 08:14:13 +0800 From: Yang Li To: mchehab@kernel.org Cc: matthias.bgg@gmail.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] media: platform: Remove unnecessary print function dev_err() Date: Wed, 16 Mar 2022 08:14:11 +0800 Message-Id: <20220316001411.80167-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warnings: ./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c:119:2-9: line 119 is redundant because platform_get_irq() already prints an error ./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c:103:2-9: line 103 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 +--- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c index 48dad9bb13d2..df7b25e9cbc8 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c @@ -115,10 +115,8 @@ static int mtk_vcodec_init_dec_resources(struct mtk_vcodec_dev *dev) return 0; dev->dec_irq = platform_get_irq(pdev, 0); - if (dev->dec_irq < 0) { - dev_err(&pdev->dev, "failed to get irq number"); + if (dev->dec_irq < 0) return dev->dec_irq; - } irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN); ret = devm_request_irq(&pdev->dev, dev->dec_irq, diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c index 8d2a641d92f1..5f07313676bb 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c @@ -99,10 +99,8 @@ static int mtk_vdec_hw_init_irq(struct mtk_vdec_hw_dev *dev) int ret; dev->dec_irq = platform_get_irq(pdev, 0); - if (dev->dec_irq < 0) { - dev_err(&pdev->dev, "Failed to get irq resource"); + if (dev->dec_irq < 0) return dev->dec_irq; - } irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN); ret = devm_request_irq(&pdev->dev, dev->dec_irq, -- 2.20.1.7.g153144c