Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp424018rdb; Thu, 2 Nov 2023 07:36:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYAKhJXvNJ5Ye5xqrqwo9VrlX8AB1kwkYPwfFbm33mOsEFGGUFG47QaoB7PBgxcfLEAL7X X-Received: by 2002:a50:cdc2:0:b0:543:57a8:a470 with SMTP id h2-20020a50cdc2000000b0054357a8a470mr7890192edj.19.1698935772151; Thu, 02 Nov 2023 07:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698935772; cv=none; d=google.com; s=arc-20160816; b=NxD4U4fOGLpRu+LJk2snx0iFbOM4dnHIWrpLHnQRtJY7gf6eKICPodT+grirozX1SF dBhoBBpCvu85drfVzbuzAU+IfqaGTR5BDrNh4NdBJZ0FAQIDx/BlaUm+zADb/GIH46zZ /Ny0VvZgoFTONH1MVxEed6TeEEpMjE+8HOHdnLL9ZT3f2BGEVEIXTu8V2GkFoY+F6WLL 1dGkntARYsNxN613Y/+Wr4f2pkG/Yww/auUVQNSW46YHqoqGWKMUdRIcjxN2ybOqgqNs I399sOokO6iTOY8Q5SMWxA2zMnYtaNdaobOl84dphgLeohSzyYUl1tNyJM+/el81R5em ow1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2kxXGpASHb8vQvtPgEKuD/+7aWXQWstAKgMPv5Qzafs=; fh=eulMoCtzHkovrL6MDWpEwyHScvAiK6h8WceQrLCo2Eo=; b=GRlPyFT3xKcCVxSNE6e6H/XEyVyklZTY7cPHih1RmiLRjMWNWd+Td0G4R2C7oVYf4Q 8SPFuCTnMntwF/rsDKihma+x2mE9kqJHoH/9BuWxH3DB98s/mOaqlN7O0gxRNIs+fdoR CcgVPBnTLqnzQcn6GpYFTY/fzn2hlqELF8bElMEzvCR4OAGg1WuHaeG+itxnL3j6ChYD M00qeLTpC2nO9zxde7qVAxzOPzWPk5l9KfD2C+VWQTvInxSCS6uF7hoMRkL5gan+XSv7 r4sNibs/OPdwVww8PnuEtLfsPLT+PpYmjNAF/EyHcyVMg6VFv6yIyIGgAv0bcn6U5vA9 DR4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ywaYldh7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id v29-20020a50a45d000000b0053ff3246dbcsi1753672edb.355.2023.11.02.07.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:36:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ywaYldh7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8E3E080236FF; Thu, 2 Nov 2023 07:36:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbjKBOfj (ORCPT + 99 others); Thu, 2 Nov 2023 10:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbjKBOfc (ORCPT ); Thu, 2 Nov 2023 10:35:32 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89FE4130 for ; Thu, 2 Nov 2023 07:35:25 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5401bab7525so1759958a12.2 for ; Thu, 02 Nov 2023 07:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698935724; x=1699540524; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2kxXGpASHb8vQvtPgEKuD/+7aWXQWstAKgMPv5Qzafs=; b=ywaYldh7n7bub0eOEO2RqApDey7SiTeoIdO4aEA7H9T/sElvGa3wj4H3Uq/Lw/RU4+ jl5SLscMOeRcS9sX9Xqq/BSmOSWsxdSUpRvDJdzoIbbcN0njUlFiUtxNID06obKMypqO AMc4j+HI5IlJ4rR3znzdPuYXUzP10BzJjD3mAnB3P3JDUmSs2QRbzBc4RXi4Hp3t9gUN mLnzdSMALnu2pEJOtZr6wavFXe+FwxbssSZmzyQJABh5v1BohtoGuZSUC50DIbBefuJ4 4CJoC6N+AKTqVDhJe+AtcT6L5NXQy8iZL+Y0RM1DWp/WLG/zBOGkUlRM/+zLiIokuasR ZBlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698935724; x=1699540524; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2kxXGpASHb8vQvtPgEKuD/+7aWXQWstAKgMPv5Qzafs=; b=tZaRAq0lXCoWP1yDWA9bJzYFJavyed8hb8RkcfAsbn79eB9s0uPw+PSswa83uIAyXE rhFz0A02w3yx7YgJyRQUYKm54yLHJcl8sjI1ygPT9/0Ey2Rk/5veOME+S/k+N0OsJiU2 WVTa5uSWVnxBPWDs4vDL4CD47qY//bjfkL01LwduCm+i1D6FTUZm589RK8KGBqWvBsGG YngJc8dkH2UE3cz4wql7rJg0zYluzcbVe/lQ8trWjGS5IBxjx3+Xo8I+8hCWTkGMWgqR voC6sdx8bpkLxiYOzE30cpWEw1sPOJnODRijAFGnJZLyqaOajviRP7V052k0lR84tZyz 6MYw== X-Gm-Message-State: AOJu0YxZUXXa6JIRDv61Fm4ZXyyR3qF3YArwCXOZQhM5/BMbyqyTSKN+ 2hL87tMpfyMLLR1uz1kJjxcXHA== X-Received: by 2002:a50:aa93:0:b0:543:6ce3:f091 with SMTP id q19-20020a50aa93000000b005436ce3f091mr6167475edc.7.1698935724023; Thu, 02 Nov 2023 07:35:24 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id j8-20020a50ed08000000b0053eb9af1e15sm2386006eds.77.2023.11.02.07.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:35:23 -0700 (PDT) Date: Thu, 2 Nov 2023 17:35:09 +0300 From: Dan Carpenter To: Alexandra Diupina Cc: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH 1/4] Remove redundant return value check Message-ID: <11e6e0bd-eab1-4aa7-8c5c-29de6cff1b3d@kadam.mountain> References: <20231102141135.369-1-adiupina@astralinux.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231102141135.369-1-adiupina@astralinux.ru> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:36:01 -0700 (PDT) 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? > + media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); > > return atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA); regards, dan carpenter