From patchwork Mon Apr 15 19:34:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 790836 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (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 BEF691649C2 for ; Mon, 15 Apr 2024 19:35:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209706; cv=none; b=jwcqaOG46no3xzlC9Cf3/Gx/VoNIWTJfHx4MnROsQkmJ70re1pQIVUSJhktChGmi5qcv7UFv6rJn1Fitiq6cGyynGDY5B2GXEr9D6WTQTMBXnBgSfd7Gr642Xh428NJTKrTeKZbyC0wUhNL49pVUun1OaRx5w1SkbKuA5/E1Sqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209706; c=relaxed/simple; bh=XZhwvXRbcWKSHFSPcZ7MTtPfoRGwp5KRtZGpZNte2nU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MI2LTLLZyUdoMK3EsmJeKvHg1addtw0dEuVwLT3cvFRBe707wx2Uy9UZjbBC3to261nJO/9N1eqCgmAD7i0iO49BtxA/oqZt79XrUYzMcoow26IrwHJgRVURgviCzDWaGpv1GrqAU95xv9d5kjD09s2cctlp6qWjWCJHXfzOlgA= 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=RKkbhxx8; arc=none smtp.client-ip=209.85.128.181 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RKkbhxx8" Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-61587aa956eso34881657b3.1 for ; Mon, 15 Apr 2024 12:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209702; x=1713814502; 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=jt2XKVmYwRsbqiFBuUwX1RfD+QA2xOHKpcd2HjFMj/E=; b=RKkbhxx8/nD2gu72sVDXiA2L3ZsemLRvHQAOhyZx0+oDckJDWUwJxo8Zilq/WRybIQ OfRIlhjMbNr60hcHzq863/1zI7lw1c+9hVTUql0GLfe19SiRssxXEQdOuRQ7SHDHYNoL h0vwG0aeenOjDdPp8U5FtKb2brE0UpAWQwPbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209702; x=1713814502; 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=jt2XKVmYwRsbqiFBuUwX1RfD+QA2xOHKpcd2HjFMj/E=; b=oGhsZuGGsFPdf4nPdiWE3ICF4nB5idO9JxjyrCfXrmlXt5Omx13gIeD2+LoJQQYOzS mEJlFB98BZJK/BFh2PQP5GxtjDhmdNRzZiRqQySAb3F66OhhE/+DRbv0XMjKvCl+CzEk /XBnKCmYM4w3eY9CdxPHIZ6h3ecQ+FhAUEXjUuigEwWlJCHg55age+/L74fiHec2h9RD aCqN6FofBpx4P/6nP24wSvyY6Hr/nwbvxpvfW3VE7vn9SSLVXhTEoMagf4UJQ+HCrOCF 3uFXI/pSZ5KVHlDJ8+5nA/owgeM0DNZp5QA2MXvw/t6eSt+MoFt8HZUQzQi96XpLR0JP 5Cng== X-Forwarded-Encrypted: i=1; AJvYcCVqJZdR6SOy+zA9Pg2dZ2iQkGO+vrnl7i9d0rAHa1qRRDf444B3FIwUtpCJjOsjZt/5TS41LxchTGnUK6+8+v6veTCygAks6hlyS0ogAw== X-Gm-Message-State: AOJu0YxhRp/T03so6AG+/LMwbI6aytJalEbkGu3pOct42D61wXixZ/9B Huhc77SsO4CM/irm+F/BqRnkqi1XmwWZzr44j3S0HqSliyG/obFLNvX1+kZteA== X-Google-Smtp-Source: AGHT+IEHr8lEllDyip6pAkUMGURPdINr08Mt5MZfIhMi3nIR8h+wyIaxQ16q8BBaKyR8INXB42ugWw== X-Received: by 2002:a0d:e292:0:b0:615:2078:9c0b with SMTP id l140-20020a0de292000000b0061520789c0bmr10298321ywe.40.1713209701695; Mon, 15 Apr 2024 12:35:01 -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.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:35:01 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:47 +0000 Subject: [PATCH 30/35] media: i2c: et8ek8: Refator return path Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-30-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?Ni?= =?utf-8?q?klas_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/et8ek8/et8ek8_driver.c:255:13-14: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/et8ek8/et8ek8_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/et8ek8/et8ek8_driver.c b/drivers/media/i2c/et8ek8/et8ek8_driver.c index e932d25ca7b3..c7984f90ae4d 100644 --- a/drivers/media/i2c/et8ek8/et8ek8_driver.c +++ b/drivers/media/i2c/et8ek8/et8ek8_driver.c @@ -252,7 +252,9 @@ static int et8ek8_i2c_buffered_write_regs(struct i2c_client *client, rval = i2c_transfer(client->adapter, msg, wcnt); - return rval < 0 ? rval : 0; + if (rval < 0) + return rval; + return 0; } /*