From patchwork Mon Apr 15 19:34:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13630641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 212CBC4345F for ; Mon, 15 Apr 2024 19:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yBZ9QcRyMnolYW/O+oTjg/Wsx/DH+WfMZx26cf65ZSI=; b=J6rFf1GGqy7VxQ vcaZNqcK6JtHb4M5OsdsEPjxKmcqEgN0U2/Ig7gsrBZNPgTVYwVYpSg6zQusM5zahEANLxjEAjtTc Nnv2LNUZvcGscQUhisXSh44X2Xfex1Xv5veeTEcowfYIs7vLq6STCul4b3MJLmdwav/aJIY+KpYLH cy98Soqyyj8xqz4mdS3gFZ3APtKI/0QtvqLsakUiu6hiD7NI66/OzSPwZSuhWzc2iLYn4oqyyJ662 43kPmldEDj75hIe8NmZZSkBPhvgOSCUGYhP5R3EgX0FmxAXA3dCCir8TrvSSE+gdnDjkE+Sw95FtH xnCBrxUA03aeGE8Fx/AQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSAR-00000009ehn-3NZe; Mon, 15 Apr 2024 19:39:03 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6d-00000009cKt-0yv6 for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:35:11 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-61816fc256dso31279327b3.0 for ; Mon, 15 Apr 2024 12:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209705; x=1713814505; darn=lists.infradead.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=6KP0c5kcroy4r+J8V6+b8GPdTtYSSQc0uibLBJF+m54=; b=EzCB5VL+5fQDFhYpw7PBZn+FgZ8OcFREQdWnOGxRk92zUzfw+ehVtf20z9FxC1QAKr 23YMJOjnsSCWga8tmUBEXKZtt1NlbbIXpRcxQBLl+GyK/xJydNHBr8mxnxFhx3QQPReB MdbG91f4NuCQwjOwrTmFceim5JRPxyEepvK0o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209705; x=1713814505; 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=6KP0c5kcroy4r+J8V6+b8GPdTtYSSQc0uibLBJF+m54=; b=XTOGarp6DnlbLzgf/gDXi3BS3aHImemAAinh6SfuoKaw57AVBp5ddcxKF7SC/S+NDu 2S/zT3VEGHtkSM8vZ8QOvXMCso7msrY2E0OlqE/5yDGjBVxjOxJzqY89WE6crDcRNzTf 2USruJs13NnaO7yqm8JdFpyfaIxN+z6YjY1K0vteDERbtMFYwVURdgiu6EyEAcsJF+n6 f2DuwoexmEpeFrp0Ysk9adf/e2gRyS3ezBzWqjATWMOrhLen0JrjrlCo+haSIttKOrW0 bLGNX7FWMUXUlx7PeT0dMSrRqQZfJTCTuQwgt9f63nDm2mQQ9vTpOjRfC2bkaVih2Ity Y4Dw== X-Forwarded-Encrypted: i=1; AJvYcCXVszYsPzh+vetD0kxn6edbJptS7BWRgP+54SKxcsJwFN6Eh2JXYpulsKUxqZQmQDO4FlN2V4klU729P8Fnlxz3pC0tVo31pAYZwS4C2D9t4k0FXps= X-Gm-Message-State: AOJu0Yx2m004MqFJ1cg11Vi8NUbF9z884Jo91ufgItOj9aDBchajXXQP U9J/bw/l6+cBX/nVev5QBXJ5jRHgT35wSQsnMwXdRygyhyGqAUAnUoXXRxfsww== X-Google-Smtp-Source: AGHT+IFGGKloXi4LQc1kB9HoB/VhdVmfNZmSGv5YL+7VwXl3CHp5amZHgBcaP1BDvt5Qqswtqu1lLA== X-Received: by 2002:a0d:cd01:0:b0:618:875e:2bc1 with SMTP id p1-20020a0dcd01000000b00618875e2bc1mr8807707ywd.21.1713209704967; Mon, 15 Apr 2024 12:35:04 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:35:04 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:50 +0000 Subject: [PATCH 33/35] media: ttpci: Refator return path MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-33-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_123507_445985_6FDEF38B X-CRM114-Status: GOOD ( 15.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a nop, but let cocci now that this is not a good candidate for min() drivers/media/pci/ttpci/budget-core.c:280:15-16: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/pci/ttpci/budget-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c index 25f44c3eebf3..2d85ae1ef50b 100644 --- a/drivers/media/pci/ttpci/budget-core.c +++ b/drivers/media/pci/ttpci/budget-core.c @@ -277,7 +277,10 @@ static int ttpci_budget_debiwrite_nolock(struct budget *budget, u32 config, saa7146_write(saa, MC2, (2 << 16) | 2); result = saa7146_wait_for_debi_done(saa, nobusyloop); - return result < 0 ? result : 0; + + if (result < 0) + return result; + return 0; } int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr,