Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp781187iob; Wed, 18 May 2022 12:51:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlr8FZlAFdKU+aepIxeWMoeei+w7JOIXutTVrbgD361zlObcnnjj0Aa7NAABr0b6vSZgPH X-Received: by 2002:a17:90b:1494:b0:1df:8252:d914 with SMTP id js20-20020a17090b149400b001df8252d914mr1652032pjb.211.1652903466881; Wed, 18 May 2022 12:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652903466; cv=none; d=google.com; s=arc-20160816; b=rnzvXpdAUKqzQTyO0M7djzzcsQUjV6FWlC0d3TWM91sj2v94ncRnxyeQLVEglWKAdC NVBLTfFGfX1TmRyoA5C0sm9N8gbA/yH+09PFxXbP7N67hZT9ZRE7VM7lIQbuy4Tp8ImW oodyTo0lxx6JiA3Bv14FPkAImDylbCVnXiia06rTJvZytaYjJVyITC0kbev9A9hNuVLW 4QecZMFZXru3bWB7xYXVY3+6g5Osi51cFr/J/Buf0xT2neHy4JlJ0PdzBAZ7ELU5Ydle n+DOmNiPib+dAF9pqpBMHMi3eD3W+LoLVi9GUAU4DhOhyNWmd2KkDeCsNdYwnP3nyICE nV0g== 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=rsuE1ABWsB6b7Hsgob1VVtsU14xSna0mLGCkyQVROLY=; b=sHd4LTHcu1PlJtzud1AgV4FSGq4KvRd9ZLRO6OCDcL+Hc8SyDLN1Cange/zvt2benI BpyTaw4xzJIUYR4oS+l/yJRTtNVEe5ZYrfvIRvDC6O/XJ5Ljl5Y02Oz9ZL9Do+2x7teY J01QFvghRLqUMBMdOXdxFsbUuKxrL5TzALqZgyeS5QfSQgBb+MKuFFKhQMm2D4u7rjAZ 5zzvlj8yV55dbnlCgYzxfE1RVYvhpW66G8Aky8ODpwbUGsRKgOUd6WtT6TSFlAOfe0tT c9Zq+HuxlHHh7466y1PiTDdRTaUx4yVX/tL6bJMs+DlCKCWKCOWMRBDxWHyVstMP2tXj goUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KaO9l1fo; 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 f8-20020a656288000000b003aac706b397si2944647pgv.401.2022.05.18.12.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:51:06 -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=KaO9l1fo; 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 3A7481C5FB1; Wed, 18 May 2022 12:47:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242130AbiERTqu (ORCPT + 99 others); Wed, 18 May 2022 15:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242089AbiERTqs (ORCPT ); Wed, 18 May 2022 15:46:48 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13EE8186295; Wed, 18 May 2022 12:46:48 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id i187so3246324ybg.6; Wed, 18 May 2022 12:46:48 -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=rsuE1ABWsB6b7Hsgob1VVtsU14xSna0mLGCkyQVROLY=; b=KaO9l1foVfB0brtQxLf6U9LXDVB+mL7N/kZKGEsHkIbIyMH+s5Xfr4VvfyCaZeYOYQ E06Eujq7zk+hiTDqO6qDOtNQ+kvQyUmuLMAmaVs2h7/nrvMB4ApBScCJJ9B8z7EUjABX qgOBf0tFcHSqw36OwstkZ5AOkJNDfpq1iq0jcEigDeJRgHG8SkDRE8P5Q5i10OkXAnhY 9yOz8VIwQwD8aj03++d+4EmS5Z4T4Qg7UDXyER1dYuNQ+6yOXlEFJjKDHtkHVcqyaI6I ChX49WV7vKOmZgEHxguzCqFsaZAoUjOhxM0sUSUouHoAeqvieg138zfUqJc7zrsZx+yf GZSw== 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=rsuE1ABWsB6b7Hsgob1VVtsU14xSna0mLGCkyQVROLY=; b=70o5Z5woxk0g4n0StHZgAmkC/p3lZj/sfdMHVLr8zdcg9tYltV0sP0km29753EDA3j j9cRIxgYdEascUNq61W/oSe2tUnZPfXEqIllmuErNaAi47rZpvus+gBTGJZlQIk5Jflh 6RM3vYPaRuUVoQlmiClejNfbNSzNyMjJ4qG8dCfsdmDrq5j6bvgVNK97Vfwxc2//3kTF i4jCGtHH0dZQPYEbDotFF/jFu5LxCt1DrCLG2XISxZC2QazZ8LBVV0+1SV0jvUDCTvqG lP2blt0DYNmqqpkJ/wUL4gODsBu6Lv4B2/Lt63EwT3gcNP7iRpgyVetvRTo6lzvDoV+J jqQg== X-Gm-Message-State: AOAM5301TJWjd0rCPrQ4yAtM/3N0xE5/g1qK5Y0sNXK+RV7XuwdHdHj0 JYA3tjRfBvWLRivMez0uMhygSycTwWe+tUhEDPJX7iHcDQcXqA== X-Received: by 2002:a05:6902:1407:b0:64a:ecc7:aa2 with SMTP id z7-20020a056902140700b0064aecc70aa2mr1197261ybu.645.1652903207329; Wed, 18 May 2022 12:46:47 -0700 (PDT) MIME-Version: 1.0 References: <20220426030544.3537713-1-yangyingliang@huawei.com> <20220426030544.3537713-3-yangyingliang@huawei.com> In-Reply-To: <20220426030544.3537713-3-yangyingliang@huawei.com> From: "Lad, Prabhakar" Date: Wed, 18 May 2022 20:46:20 +0100 Message-ID: Subject: Re: [PATCH -next 3/3] media: isif: 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/isif.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Lad Prabhakar Cheers, Prabhakar > diff --git a/drivers/media/platform/ti/davinci/isif.c b/drivers/media/platform/ti/davinci/isif.c > index c53cecd072b1..69e862de014f 100644 > --- a/drivers/media/platform/ti/davinci/isif.c > +++ b/drivers/media/platform/ti/davinci/isif.c > @@ -1107,8 +1107,7 @@ static int isif_remove(struct platform_device *pdev) > isif_cfg.linear_tbl1_addr = NULL; > while (i < 3) { > res = platform_get_resource(pdev, IORESOURCE_MEM, i); > - if (res) > - release_mem_region(res->start, resource_size(res)); > + release_mem_region(res->start, resource_size(res)); > i++; > } > vpfe_unregister_ccdc_device(&isif_hw_dev); > -- > 2.25.1 >