Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1653762lqp; Mon, 15 Apr 2024 12:45:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWI7zJl42yrfJbTzSIICco0e26p0ZGMOVWnoT8PtTjMJbYmGEcNqHixalt++BGIw27Lm426aTRm/OSiMObL65y6zC3hF8Sn9B76roGorw== X-Google-Smtp-Source: AGHT+IFJNyKDe2D7+DCmYOzazGbPtuuURrTAJ0QOkc8YHfLRXNvErGRzeSkMRdU4wRelK66FhusN X-Received: by 2002:a17:907:7e85:b0:a4e:4771:6267 with SMTP id qb5-20020a1709077e8500b00a4e47716267mr8970339ejc.4.1713210310185; Mon, 15 Apr 2024 12:45:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210310; cv=pass; d=google.com; s=arc-20160816; b=ODFC4UkcFXDTJ/O0um9ouu/Ig34ztw1za40+ppVfzmejP1MJuqRREzCVugpKh3oRt2 K4sdEQ8k0I9RWuNKQF2OX05T1k8p2zgOLoR6RdRG0UcEDN5JNwNzB0e1PrS+I3+texGL SE8nYdULXkDqA5bTXs0jtxDqqepK21IIYlJo7qzjmaIWLNtQ8t+FFCpCnWesasFbz4OQ YPFQgT256pIL5mH+LeVRsALlSoRiQhvTwEjndDBukou0LqnOunMqoZ8x9GrfFljykM0p E6msHCLt/HCKBz5emPkroA9WabaWSBQp8f1UjbHBPN9/CjN5u6aK0VPUoz5UbAxwqFdG ncXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Mj+/6N0GPAfvwkpBReOqoC7KAQaGgvQV6dmd/kYlEN8=; fh=U8AteWKp7ENpqNuKVxO0UbCtkmITLAfgqYQDWgdUV5U=; b=LiCMJMHmC/vBdOt+GCa7QZiRzCGtG+PAhNk6adcTezuSbuzWZoCrtSF/q40HhCOmU7 b8YAnYLErQzEnIo9i9UViG+uT15LA7bvndNO60k6bK1U/ExPFGDG2voVUM8z7Taz0g+m DpMZQxj+E4vtoB500A5FvETh4opd/q4piJSd+NlaBea3PLC7Mx83RWr3EgTcOJs4HvsO TJ1Pq38YEGr6PhC0hKAoMG451Vn5mF7sZpYMOBO9t8m+HdROx5cbNhPJHvGrHIK6ULhj ORgFRv3+lcXhpiQiS2jyLPxxLTzLILZjMwA+kTk5xDe9SfMkW/fKJ6O+gEamlglKvr0M z+sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bPga3VYY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kg17-20020a17090776f100b00a4728a519c5si4866159ejc.953.2024.04.15.12.45.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:45:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bPga3VYY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145811-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BA7FA1F22B24 for ; Mon, 15 Apr 2024 19:45:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B55BB16ABE3; Mon, 15 Apr 2024 19:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="bPga3VYY" Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571D81635AB for ; Mon, 15 Apr 2024 19:35:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209703; cv=none; b=MT7dk9G+ypZIjqtNv7yxYJrwiYeDvuzQPI+k2jS5J8GkzFIGJkrbU2Ev9aL0Nnf0tC3jjNasKdhd4z7DpGdXaXdGkwh7DX4Kfi7GI1eyeDa2zPVnee1Es9AW1C9o+QmYGYCszWtr0RkfnHwo4hrbPSbiJWg1GA5JUMZcAYvCsT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209703; c=relaxed/simple; bh=As2d8puekv3wE81Lbh8pk0aXTZ4wR0q1+eriDu5asDs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hNKXj1bx1frpt3ans4lPxUX5r+ZQBUPM156BL/atsc2P1+CFfXSxisgnUTSLgAz2SP6DETAeULOhcAuwsPPY2u16vKMQlSX7nED2V3RRsdH+56LF0PKho9qpl5eu9QzS++V65KP0prpTtHpYy1Gm3di+LX7lwabo0peYc6N578g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=bPga3VYY; arc=none smtp.client-ip=209.85.167.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3c61486d3fcso2133137b6e.2 for ; Mon, 15 Apr 2024 12:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209699; x=1713814499; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Mj+/6N0GPAfvwkpBReOqoC7KAQaGgvQV6dmd/kYlEN8=; b=bPga3VYYQw063FYKul6YD4eTUmZWCCY5ZUdwfw1E6NdvIzHf/djDUQcdYByjL6b4YG YWMTTmVH6b7t33hrqhkuA8HXaHdiJ8zPsDMPocraVwS2P12jEFEYCpDsOIUWjddfLLD4 L+FQ02dy550HTIpo2KGgkFok9XBIt4tyDHGbs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209699; x=1713814499; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mj+/6N0GPAfvwkpBReOqoC7KAQaGgvQV6dmd/kYlEN8=; b=S75paVcINkSzNlF64ZWnY/jn+vpCbnJlds04YCS0e28lsYwW+wFF95KMzlGEKq9pcJ vf9U9I7JDxHPoquOx3DCZsH0ktpAyIj+J+Wu8t6fPc8sNkLu+yKfbt9d1HpS2KIWO8Cd jOKJl+fKcBvchdUwXSBJg0ajVaDf8Sa2SKWM1N42A9QLPsVDQj8hhFzghb+D+pX1Dwyu Z4Qz/JEwQABGUfwCckR0MYmtwsDEmryAt4c36qmvx4SFs/g35Qo43CI3SCYQCov65PFz TDrj+xB3QsNNkuh/WHdfGfupxi6qmVsCiIL6yaFrNq5r2Z8Ghk259zLNuXIdjWGdtfGB os+g== X-Forwarded-Encrypted: i=1; AJvYcCV8WaRtZ0TX9kALvrkyqcCG5VMMPdkWJwAvHIHQ+1qDLgeBaWrQRg2HrWGUNRxzgHtFCLH/2c1w0D7yJScetFps/7yGFwz1Ygq9K2HB X-Gm-Message-State: AOJu0YwmpbX+C8LxriP7jX/GFNixpAiyg1PXiUOWrEMuASvMXyM4FEb2 pZx6L6ck1B0vgVv5aoAeARIKvqPiNvkQzI+aaoXviLRnuE7gPxFi6bbrr80YHw== X-Received: by 2002:a54:480c:0:b0:3c7:c12:e2fb with SMTP id j12-20020a54480c000000b003c70c12e2fbmr5150205oij.56.1713209699409; Mon, 15 Apr 2024 12:34:59 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id s26-20020ae9f71a000000b0078d3b54eb76sm6718055qkg.78.2024.04.15.12.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:59 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:45 +0000 Subject: [PATCH 28/35] media: usb: cx231xx: Refator return path Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240415-fix-cocci-v1-28-477afb23728b@chromium.org> References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> In-Reply-To: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Pavel Machek Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 This is a nop, but let cocci now that this is not a good candidate for min() rivers/media/usb/cx231xx/cx231xx-video.c:1282:12-13: WARNING opportunity for min() drivers/media/usb/cx231xx/cx231xx-video.c:1328:12-13: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/usb/cx231xx/cx231xx-video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 8f347bbeeb32..bbe207d72427 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -1279,7 +1279,10 @@ int cx231xx_g_register(struct file *file, void *priv, default: return -EINVAL; } - return ret < 0 ? ret : 0; + + if (ret < 0) + return ret; + return 0; } int cx231xx_s_register(struct file *file, void *priv, @@ -1325,7 +1328,10 @@ int cx231xx_s_register(struct file *file, void *priv, default: return -EINVAL; } - return ret < 0 ? ret : 0; + + if (ret < 0) + return ret; + return 0; } #endif -- 2.44.0.683.g7961c838ac-goog