Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp425591rdb; Thu, 2 Nov 2023 07:38:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2dil2aOqghl2QsR9r1w4xy8g4kf13ALn1wSrX9npUb0GYLXeYmV04HQFTN8ZJ6QpRCVhp X-Received: by 2002:a17:902:bf44:b0:1ca:c490:8537 with SMTP id u4-20020a170902bf4400b001cac4908537mr16117461pls.14.1698935923711; Thu, 02 Nov 2023 07:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698935923; cv=none; d=google.com; s=arc-20160816; b=qkgbcebg/umfJO1Tkcovi7BZpmoQ05TlpXPOFbDnoGWsU6j8aoU2MWObXZJ+FQSxZz CIMuRbZZNwsKCjBzAi28e0zmYVz/gkjb94HInNTF13vsu7X3eSHOZzECyMv9wodibPLm IvcTPRdnJA9afFt2ueuenspI0Rzw0KkGu6upuUrnjF52+4JidG0I8ym6JdwsmVTblHTc LbYIZQJrzdZ12j9MkwJ+3KmLKwHVU3lnsrRFYQZ52y4zqBSYFYdtoSlyWkHAQV5INAPK 2vBkIz6s99p6PU0lyPLscUyVvdQV8YUsu3LqSygonOJxb5aAnfkk38rOYcQMtRXaGpB/ moFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KpWoxrCsZzrPDM5jl0OZhNo3kWj8IkQT190+RVq6sUs=; fh=eLxyle1eXcdo67npRnRkEqr3JAlJ1u4S5zBoPs50Loo=; b=md47Ar26IvB2CeQdxQa1frQnhis50dCWTbOtdb6kLHE6A5Y6KDmydv8RxoP5tnhrB8 XWkuTO1hvaJWI6gKlGOBLJYrlblAbSv3/eUIrEgvyI4J92fReIHa2jUiTFsx0gYHN5Uf caGI63MKQOahlmyYWfpCwI5VmGhuC+He8jNpaA82wjFCY7nGX/bf6dhOJ86RCpxgqjID +H05fJSAdlb0yZGWk6XbxU/r8LNwf3qMD3OFJxD+usVuAhjOqOBMlxZlhowBHtkU+t+q QB+geSEyBU6i/7n0JZKbR0OCTRObzqjrGVmbRVicAWlFxrIEXzwTmYqUI1DJW6NuvraT inaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="R/l+A7ZI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w5-20020a170902e88500b001bbbbb61c71si5227019plg.399.2023.11.02.07.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="R/l+A7ZI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8AF2282D878D; Thu, 2 Nov 2023 07:38:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231896AbjKBOic (ORCPT + 99 others); Thu, 2 Nov 2023 10:38:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbjKBOib (ORCPT ); Thu, 2 Nov 2023 10:38:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C04138 for ; Thu, 2 Nov 2023 07:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698935858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KpWoxrCsZzrPDM5jl0OZhNo3kWj8IkQT190+RVq6sUs=; b=R/l+A7ZI1/JHcmGW/EbDN8lkOp8LLdPPXCMoG2pwK/1OD7svTsSpnTGogcnNgvz5t2yZum rlxHtYmqz2dND3fMUS4AFERT/GVKBalYCa+eEMo1D9PyuMv5rqT3XqaR7ye1MJhDlM/Hou +TVmfLFEanXVB74uN5puDd9qxSKlJvQ= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267-nmZFxrjFMoOTt-3UU4rcug-1; Thu, 02 Nov 2023 10:37:37 -0400 X-MC-Unique: nmZFxrjFMoOTt-3UU4rcug-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9be601277c2so71616666b.2 for ; Thu, 02 Nov 2023 07:37:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698935856; x=1699540656; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KpWoxrCsZzrPDM5jl0OZhNo3kWj8IkQT190+RVq6sUs=; b=WlBf3UpDiM1o463pzG/UIWFe4p+n1OCX1HHprx3MmrdE3xmmODRrSQV+gg3MaU6yfs /44cKMkAmsWuwf1+AIkj6Lv342wvlHbJE67/hE40haUviWyr9alf4RDC5oJnDi/2/5MH 5RWU8BJf2u6SKk+uYs+xZHNHZ24p1e4wQUluudZedQjNFFxBfLB8NfbEH61Q583WDQfh +r8eG7ayciKgrEQCLtACCNBCCPlKghOfVaMIw/Ca7CbODpG61PsGtIftfKWiLiEBdEOh acRHF9Ta+n91XMzyCLN+DQqsIDZAAob+HowlRI+tEeWEVfQazTYenQfz99m2H7kKh1P8 cUBA== X-Gm-Message-State: AOJu0Yy9uklRcB4u9BPn/VxSBvuuYlDSTPNweZNpOtAjvjfF9f8d1Esb KK6FWaq4q70JjJhbXWwxKUsbnfmMjcVEStBSm4ZYtA/TbVx2qqoKwB7yRPGrYDuKeSSecFU02LA gqPru7qBwQRwB0X8IphWcOzTo X-Received: by 2002:a17:906:794e:b0:9be:1012:91a9 with SMTP id l14-20020a170906794e00b009be101291a9mr4748269ejo.4.1698935856335; Thu, 02 Nov 2023 07:37:36 -0700 (PDT) X-Received: by 2002:a17:906:794e:b0:9be:1012:91a9 with SMTP id l14-20020a170906794e00b009be101291a9mr4748257ejo.4.1698935856035; Thu, 02 Nov 2023 07:37:36 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id s20-20020a170906bc5400b009ae3e6c342asm1210005ejv.111.2023.11.02.07.37.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 07:37:35 -0700 (PDT) Message-ID: <5ef34d97-e612-a92d-149a-8c966f363342@redhat.com> Date: Thu, 2 Nov 2023 15:37:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/4] Remove redundant return value check Content-Language: en-US, nl To: Dan Carpenter , Alexandra Diupina Cc: Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20231102141135.369-1-adiupina@astralinux.ru> <11e6e0bd-eab1-4aa7-8c5c-29de6cff1b3d@kadam.mountain> From: Hans de Goede In-Reply-To: <11e6e0bd-eab1-4aa7-8c5c-29de6cff1b3d@kadam.mountain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:38:37 -0700 (PDT) Hi Dan, On 11/2/23 15:35, Dan Carpenter wrote: > On Thu, Nov 02, 2023 at 05:11:32PM +0300, Alexandra Diupina wrote: >> media_entity_pads_init() will not return 0 only if the >> 2nd parameter >= MEDIA_ENTITY_MAX_PADS (512), but 1 is >> passed, so checking the return value is redundant >> >> Found by Linux Verification Center (linuxtesting.org) with SVACE. >> >> Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") >> Signed-off-by: Alexandra Diupina >> --- >> drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +--- >> drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 6 +----- >> drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 -- >> drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 2 -- >> 4 files changed, 2 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c >> index 9fa390fbc5f3..f10931a03285 100644 >> --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c >> +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c >> @@ -840,9 +840,7 @@ static int gc2235_probe(struct i2c_client *client) >> dev->ctrl_handler.lock = &dev->input_lock; >> dev->sd.ctrl_handler = &dev->ctrl_handler; >> >> - ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); >> - if (ret) >> - gc2235_remove(client); > > Not related to your patch but why doesn't this error path return an > error? Can that be right? This is staging code and there are multiple camera sensor drivers under drivers/staging/media/atomisp/i2c/ The gc2235 driver is one of the drivers which I have not yes tested (I do have hw to test it, just no time), let alone worked on cleaning it up... Regards, Hans