Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1653906lqp; Mon, 15 Apr 2024 12:45:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVuIHp8mxWSx9YC/YSDWqX6uB/8TcOPgAF3bMMFBw/3KDIQNPOANh7gNqwMg0MSBFSgRp0xdSM9Dsltk3tEctp4nP/JTNUryae9SnMJg== X-Google-Smtp-Source: AGHT+IGzhRl59OzOxa2mJmfTdpVSyQDzyDoh+PKM+ZKYLLsh19Ngb/3xS2nkxg5l1H4JkaXvWW5i X-Received: by 2002:a17:906:7145:b0:a52:8a8a:59cb with SMTP id z5-20020a170906714500b00a528a8a59cbmr1697782ejj.61.1713210329829; Mon, 15 Apr 2024 12:45:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210329; cv=pass; d=google.com; s=arc-20160816; b=Cg7pp69TIuTAXPWntnocShkGYEDkrLEjMy5fBPUhm38C9XVOdZcs4hBGSPFA9jNCo9 6nYjI6iQFDPO2Wi5EtzrToiO0U2Y/wzsyGgoj2dxxH5s/XFsNtBTrBiZ20SlxFA+LbbH EEQZ0hfhymMs3qpcoC50SGTiMdOxjMRZt3rzIYDYjoRM3dqkchOQzKt/+Iuyr3FU1mjl q8lEQRiqVTxoObgxhkBBBxW/NORmSV9c3UHT6F7DGGzLaR+rSwwZgmeGvhLmOWP+rwOE Vn1zpEDMcV0Q+0Rrvkiet2Ye6+0N8XLA0hA6ZJHF48x+7OJagWzIlpQtLK5hKBMipkpT nZ0A== 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=OhmQYYxWMuudLBjdJjOGHKHYUzO1QQEhFUDY1X02X9Q=; fh=R0ol3bYrl8GXjPceEwE4xU9N17cD+4W1nENV7N5x7D4=; b=iBmLqYYO7VwgvYm1GoErh+pRi2gyi5UlS7RTbB7tUiQ4Qn4DorSyJOWTB/PWeD+qK4 SaXsSLqP77ge/TeFKXGADIlVwGzamnr4cbxGXZseCvBe9QH9cF3kGpy/+bbUVC8RSQe8 wFflGgxkdsQuwrCQ9+m43Y9SUfHYEgphzy9VGEUpa+8iU1IVNpF9FszNSGxAU45gWfNE sYoMl+088etx4Q7d6IdJC52fO5o2eXE3RAOJ0j7CFU2he20Jef31OoUvXef5320QOLSv shnHprVOTIsCKmG8Ppbj8JUPyB5eplfzzuiCtfAacrt+Rwy+joFISMz3hL8adeyUv8cs WGMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LfHIP3YS; 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-145812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145812-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 ne2-20020a1709077b8200b00a51c1d9927csi4880257ejc.570.2024.04.15.12.45.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145812-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=LfHIP3YS; 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-145812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145812-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 7BB761F2112A for ; Mon, 15 Apr 2024 19:45:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DDBF156C53; Mon, 15 Apr 2024 19:35:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LfHIP3YS" Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 C80EE1635CC for ; Mon, 15 Apr 2024 19:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209705; cv=none; b=UoxawEri3rejokbxQ5cEPpgQ0vSjwtndmqrOSUZeOzecbiPpivvKyTJmFcKCaFPbnmVhd5jbzAm2YPgIdOdjnrzmm14RU8+qAVZ46Pj71GplbYKR3v3PQxEaeTCc9ji4Pf1CUvrF2IeOrlvv/7tgzyDh9+JMzBjyYzL3muywt2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209705; c=relaxed/simple; bh=VhbJFqc8QmLlbHWJnEENrvmuq+ozcGe5o6fFyH1YYQU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E5gnjfO1hjAcyqAbLqVBgcPzDW0/n/6mV1l2TfFMhg8zbeu8M8SR2tpLDjST0/QQXYbKg55BIKPImM4RkivkPZmrLh5C50v3eWLjPmbBCjTiYwZj5SDPNq9rHUIS7Lqf/q0aJJTCQMEktrkXt7FO1GAkhbRkG4eyq1Z5z3sC8jA= 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=LfHIP3YS; arc=none smtp.client-ip=209.85.222.182 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-qk1-f182.google.com with SMTP id af79cd13be357-78d620408f8so295553785a.3 for ; Mon, 15 Apr 2024 12:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209700; x=1713814500; 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=OhmQYYxWMuudLBjdJjOGHKHYUzO1QQEhFUDY1X02X9Q=; b=LfHIP3YS/F+mTAzygDVHslx5fAuRJQnA2sSJ5ftryYm2qeaCsuA7qFlI+6p9qUxdkL GuJ9mP67JlIOKKIPlIcpEvUvKrahgJfXZ2/yGY/pppGNfmjI/IW5WlCChJSzsdgMAgwb oMUzsZcPcHH5obx5uHQ2Eq2tJlkHdq4Lai9No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209700; x=1713814500; 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=OhmQYYxWMuudLBjdJjOGHKHYUzO1QQEhFUDY1X02X9Q=; b=BzB1waqrK9UJ/fBsCZAD+8PkkLK8iakpI0cQ8LD6N81yFt4C8cx74Y1t4OiwjQa0f1 zHmo4kJidhdVMyENBdG1Ev4atVXXhzgOVukugermLydeqse+3pmd91CJqKHvb9I7pg6p 78CIJwJHqFrd5mutyySEwdvm36NEXSjDdnZy7slotlo7Ku3ufYpvZ/xZqESrt8YTbxXS KJrH+DXS/uL4LH5rOPMaBGSNTu9UccBsPx3cfH7ZExnOP2u0chRAoIWzhus1yfp2KKDe ms2OfzTRCKF4SNGPrXYVGXwP1mD8C6R71nnCVBQ16rzQ3RHmANFDmBc+pStnp/jnJMpp MDZg== X-Forwarded-Encrypted: i=1; AJvYcCXpLu4wDC8w3w1K7cbK4Jut5g9242qoc9ngO+BZUp5c74mqUd7R9iECbkuLrHqfJG7z6VTwiDlfK2rDTf7E+MO6PMmWsCD89nMl1oEU X-Gm-Message-State: AOJu0YwYAMtNA5ZsrUZXxLl/w9IltN7vaYm7vESU8A0PrOLhWDyMqMZN cYKzfbwOWcZLRmWu4Ay6O9BdG5IMyUU0Lyl0K7Wt21i31ruuipT3+pFBJwESyQ== X-Received: by 2002:a05:620a:3182:b0:78e:dcc4:339e with SMTP id bi2-20020a05620a318200b0078edcc4339emr7592795qkb.11.1713209700585; Mon, 15 Apr 2024 12:35:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:35:00 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:46 +0000 Subject: [PATCH 29/35] media: i2c: rdacm20: 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-29-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() drivers/media/i2c/rdacm20.c:363:12-13: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/rdacm20.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c index b4647bda8c21..b40d40b0cdd4 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -360,7 +360,10 @@ static int __ov10635_write(struct rdacm20_device *dev, u16 reg, u8 val) dev_dbg(dev->dev, "%s(0x%04x, 0x%02x)\n", __func__, reg, val); ret = i2c_master_send(dev->sensor, buf, 3); - return ret < 0 ? ret : 0; + + if (ret < 0) + return ret; + return 0; } static int ov10635_write(struct rdacm20_device *dev, u16 reg, u8 val) -- 2.44.0.683.g7961c838ac-goog