Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp777602iob; Wed, 18 May 2022 12:45:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6wqZ8TVJePFpkeFkiF7GPRScqTdBN6jYiekbe6m5C/+HxTCQJtc3yojaxbMiwY4QqCDEV X-Received: by 2002:a17:903:2445:b0:161:d47e:88cf with SMTP id l5-20020a170903244500b00161d47e88cfmr933862pls.67.1652903144883; Wed, 18 May 2022 12:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652903144; cv=none; d=google.com; s=arc-20160816; b=gl3DEFvCE81wX8sOOB5HRIM/1B5TxcJtuYfXl8PJEXqRGPvDrYUo89yEuvwZSkFxKB XSagywmgA5zr6gtVZGnHjIZATR4FSxS1mOimRAWjF4QgIwHz94x9sUDYwCTq3QttgXy1 Fvj9ef+YLqerNQLf5MoDXz5nJKecvXRlyBn3i1fiMpThs+UVbNdRPLgXgiwzwJ1C6bMD sQHRvnwbtDpOEj6Wovy0CAVi0ylDsNjB8qmw6BfFG8dgA8Z7v/pLcVTLegOpmDWQSXBJ KIJ54QWM6uJihC1or83xgEj5wbuCtJVW9h+nMnfr1tYQxAB8Flt3baRJLiUy2WQ7iNsA efPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z7zHFESk42U3UBmzkmcgo7A2Pfdlr24WiPzijq7ymak=; b=csPqAeFvlHDMJxDvNHD69At+qPcQpEwTlPHkph1LDaCLIn4cEHP1OYRzCL2wK0US5U wJVMgn0ASVEm3yn5+T3uQq1yIQ1aeU0uR0Ft4S5Q1WnGF2mii34awaXylp8n/0vgQER3 pE76R76PhMxdNdEIm2bGbIskljOpObD2LW9DPmz+VQnVwEOScV9dfOAOmIszfytzct2a QRSE92juOdbb5M7dOYlrd4qNYaGBqgkhVafBjbHdm9Gr3KNHUmD+0QwnK6ERjIeMcPGp U6FLSjY4dWwrBg/9diYI2BWYOMRVimuL8+B6F3LQVWkCaGUbIPSvSTc/7SqR37S8E+or JccQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lyk72Hbv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p9-20020a056a000b4900b0050dd5012e1esi4603709pfo.55.2022.05.18.12.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:45:44 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lyk72Hbv; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D118420525A; Wed, 18 May 2022 12:43:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242073AbiERTnE (ORCPT + 99 others); Wed, 18 May 2022 15:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242059AbiERTnB (ORCPT ); Wed, 18 May 2022 15:43:01 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 477121C15F8; Wed, 18 May 2022 12:43:00 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-2fed823dd32so35413557b3.12; Wed, 18 May 2022 12:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z7zHFESk42U3UBmzkmcgo7A2Pfdlr24WiPzijq7ymak=; b=lyk72HbviVdVVj7A5PSBnMoOHYhxquyKcKH/i5ivoOphl32X2GsyF5WAa946fHGxKY 4GFUy2wBdmi8+J+6pcclPt18fXLh5rn552afQTTHl+SYarmxf4P/volmHqB6o5+G4ZOb oxTekprfxY/y5LwrIVonb2heXKAXiOBN/iyhY8dLuBKhH8RE8q0LLOqjq9Y+99aIO2t6 Y5m4oXzWb4c1AQCJ2XqhwexoTKAyQHuNiaH12PNLxBE39pVUd8LO7f/wo63XCt4qTiF6 0xUfVOuLJeIpkvY4arNMHULNRTnfsYk5HuTa0xK5N/Vpm9C609AFKRmKn75UWwgitULI lg7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z7zHFESk42U3UBmzkmcgo7A2Pfdlr24WiPzijq7ymak=; b=U3yjjBYDSdRnYiT5wNJ4uL3LPCLZVbvxCMxSOVezr7bkn2+iJfHpHEfnwH4X4R2xdz /5N9ehrzG+GzuGW68Nxko8oS+5x/2CI9P8lkPowk4W+ws/CV68L+lgHP7Z3pvYpRgmpD 9MJ7QF9uqaoSB2KPjtoclkfMDOQib6wlUjaddUI8L1tkucF1cZFuOQuPPI2WoEVj6NDb 3PRpu4gyNJzYNoVz0N2aM/xfZcEM0r+2o1S1TbdDt8BGEe9yXjrGGIQS9dJtzNpHGbHg kWfptt7bd1MOvXNcBB00uxbInCbI5IRgfvpNgaQHtDN1rrqvGkpDN2mQF0RwQqh2FjAq dZxQ== X-Gm-Message-State: AOAM5337TLRqiimDBFYvJ9XHeFfr2gDYfxj+hw//1V91IZ/RbFNlCIUp Cm3m3fLoOLH7nZRqaJ848XtoVXVSQ/92ZihjgZsg5mtL4NiLPQ== X-Received: by 2002:a81:ac5b:0:b0:2ff:45c:2e85 with SMTP id z27-20020a81ac5b000000b002ff045c2e85mr1143478ywj.16.1652902979559; Wed, 18 May 2022 12:42:59 -0700 (PDT) MIME-Version: 1.0 References: <20220426030544.3537713-1-yangyingliang@huawei.com> <20220426030544.3537713-2-yangyingliang@huawei.com> In-Reply-To: <20220426030544.3537713-2-yangyingliang@huawei.com> From: "Lad, Prabhakar" Date: Wed, 18 May 2022 20:42:33 +0100 Message-ID: Subject: Re: [PATCH -next 2/3] [media] dm644x_ccdc: remove unnecessary check of res To: Yang Yingliang Cc: LKML , linux-media , Mauro Carvalho Chehab , Laurent Pinchart Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Tue, Apr 26, 2022 at 3:53 AM Yang Yingliang wrote: > > The resource is checked in probe function, so there is > no need do this check in remove function. > > Signed-off-by: Yang Yingliang > --- > drivers/media/platform/ti/davinci/dm644x_ccdc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Lad Prabhakar Cheers, Prabhakar > diff --git a/drivers/media/platform/ti/davinci/dm644x_ccdc.c b/drivers/media/platform/ti/davinci/dm644x_ccdc.c > index c6378c4e0074..e4073e99914c 100644 > --- a/drivers/media/platform/ti/davinci/dm644x_ccdc.c > +++ b/drivers/media/platform/ti/davinci/dm644x_ccdc.c > @@ -839,8 +839,7 @@ static int dm644x_ccdc_remove(struct platform_device *pdev) > > iounmap(ccdc_cfg.base_addr); > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (res) > - release_mem_region(res->start, resource_size(res)); > + release_mem_region(res->start, resource_size(res)); > vpfe_unregister_ccdc_device(&ccdc_hw_dev); > return 0; > } > -- > 2.25.1 >