Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp777546iob; Wed, 18 May 2022 12:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxE/YhRCEBhldI3EGokwlmJRBZJ2+9zsnItazd+4zww5+PnPzC+7LMljT7CHh0k/3t2Ue+z X-Received: by 2002:a17:902:f707:b0:161:435d:d069 with SMTP id h7-20020a170902f70700b00161435dd069mr1120616plo.105.1652903138786; Wed, 18 May 2022 12:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652903138; cv=none; d=google.com; s=arc-20160816; b=OuML48r9u4O84RCfncahGQkF7hYwlruqIlZcHx0K0UtJg4zbclW+tL/RLaEFiMhRCT mtLIVyinrD67oFxT7Hn+5WkUpog5f1OhXIuGzJKhnzItbQFwqEP0x5OgsI//zE0rKZ/G tVm7mOq/IERJkW0yUznQbLBJWrT1tA1vOHFuNmSFE2oXHDNls/5u8GR2+v99855jHzQt yivMIoBfDHbcGo35x3hfV5G78aaWkCEQDe4BO1BGs9mdguPJaUkGRiMoqo5kp3F4JlAP HSevg/U679ns6UlBR+1ZNPlfSVLGc1A1DdYm9SC3uidDQ7KSylzx4HQ4QQBtf3EZHQgp EZ9A== 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=UIFswqFpJE+LYp33RSOtEn9hjp7HRzUG7X1FIKlVf3k=; b=YzBbs3SylEp8cBNc3NiA6xTcI2ObzhvA4l+xpXrncQcN7KhRs7bfP6WLfoyg1GOBES W22ORMosvCQEGFHb8aIXWiAlsfPYKc999XjhRI8oh1jZqwEMzak3PeMY2VtOZjX+VCFA B/YlcP84OnPA6Alc2R/JCiBOVMWHqNJkuoofAm3BAVY0lPlLK89aU0sySS+hDnjfWoeY /CTHqvqRK7AeNUj1OZYgGc5Jl8fF2MN8MTcKLHqqN9yIFBljUbyMouKs6p6s1Q75oMeI FEXT2xvZ4LLIkR9jlZbFvrV5Bi9wza6eWHftcm4i7R/jhli69DwtZdVEyXCZFkMubv88 c+hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cACMbUC5; 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 j13-20020a170903024d00b0015e8f00a7e0si4019399plh.384.2022.05.18.12.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 12:45:38 -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=cACMbUC5; 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 6716D14AF7E; Wed, 18 May 2022 12:42:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242060AbiERTmN (ORCPT + 99 others); Wed, 18 May 2022 15:42:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242012AbiERTmM (ORCPT ); Wed, 18 May 2022 15:42:12 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640E96D396; Wed, 18 May 2022 12:42:11 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id j2so5546565ybu.0; Wed, 18 May 2022 12:42:11 -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=UIFswqFpJE+LYp33RSOtEn9hjp7HRzUG7X1FIKlVf3k=; b=cACMbUC5qMKiXKbU+3vCq+NseHnnmkWsxWpW3UPeSbvfCq1ifhpT/pWs7vkZf5GqbG SIldrr4w33+mMLG7jOxfV0QZScpGOpjgD/LSTWbj3/BSBF/dzvUI10U4YYyU0agSYnw0 VD1YTBp59r1MHO2ll6eYDgp/TMn5dhOTLcD4Vke3dBA/6cYzYEfAHtItvAxfBT130lSj 1mzKqVbkRKq4bQRmZb5oC7PfBvZxyEzy4JkWz0Rvf8Uc/uscivN2LxbV9Q9rhb7XOtKn qlnpIdtfnxpWf4JNDMcKWKBDiLdjWdHtn4Dcu7Cy809+u4sNbV2GTjzENed25tB0XCd8 nyjg== 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=UIFswqFpJE+LYp33RSOtEn9hjp7HRzUG7X1FIKlVf3k=; b=YYDYHsdbwpoGw/yxdUNEXZveGHQxUOtNtXI8uUZkM9sD7x/xW6k9oLnxwyGLjxA9Rs q2JHR5af72AOThlCzfleKS3G5kRB9y4hf90reaYcfkVM4LhTUG15fmMdvBO6PeKuJZpF SIHtfpbWh1BBkpunPmjItFiEpv+iYm0dD4YiEG/th/yzENH5tEfoADYY1QbmB28mGGu0 Ie1VRzHQ1a6Xzm+sroLs8Hz53We5tByyh1Ufy+Dt4KQMTToU3MHkeqxyCGrhkcgmky52 OJ6Khmie93gpPKXvDG5UJC7X7JaRfn5IKFjqz9xN2BJJ4DlVdeiy04hFCTKn/kH1YWkX 5Kjw== X-Gm-Message-State: AOAM5307TAMU96bf94WkqCSjnskhQH7XVv+cwOq4Qq4aSlhylEaLUoIX Ds6woR/CJNpTGKRbTgEhVqySLfGbyKSzWaKa9z+AGsy2sBQvQQ== X-Received: by 2002:a5b:246:0:b0:619:5651:3907 with SMTP id g6-20020a5b0246000000b0061956513907mr1218173ybp.190.1652902930700; Wed, 18 May 2022 12:42:10 -0700 (PDT) MIME-Version: 1.0 References: <20220426030544.3537713-1-yangyingliang@huawei.com> In-Reply-To: <20220426030544.3537713-1-yangyingliang@huawei.com> From: "Lad, Prabhakar" Date: Wed, 18 May 2022 20:41:44 +0100 Message-ID: Subject: Re: [PATCH -next 1/3] [media] dm355_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/dm355_ccdc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: Lad Prabhakar Cheers, Prabhakar > diff --git a/drivers/media/platform/ti/davinci/dm355_ccdc.c b/drivers/media/platform/ti/davinci/dm355_ccdc.c > index e06d113dfe96..8fe55d1b972c 100644 > --- a/drivers/media/platform/ti/davinci/dm355_ccdc.c > +++ b/drivers/media/platform/ti/davinci/dm355_ccdc.c > @@ -918,8 +918,7 @@ static int dm355_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 >