From patchwork Mon Apr 15 19:34:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13630640 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 E1267C4345F for ; Mon, 15 Apr 2024 19:38:59 +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=UwngFTCb79vmvxVTXW4RODyFL2STYLb4pSDjNZDAhDQ=; b=lM/2y0JWRmX40D hISh0+Gb9pcWJB6CnGS74eRX37Si7OombWu1PSA25KIM/bMObWDmXzOBWnKSRZtQHn57ksjCxxxQ2 Jab70860v5JYe6Y9KZyb9A32VXnsHKAD5Cj9k6mZSkB0H+7Yc4bIuI4ig8I0+sw9SrPlzprisA1pl zMAK/GcRDHODUe3IRb+yYY+4TfvQPscziFL+TBhg12TsSkupbFABT230gvqta5xLmD6UW2pSjYuvD R1swOkslOcAx6MTz6xodVkmgCPFXfXgIH9rnoPav4aIWYBeEOOY7ByBXZMNQUz6xtu2PDmwRw0K9J V7NqQir3RNpLnO9AmjhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSAB-00000009eX2-2gb9; Mon, 15 Apr 2024 19:38:47 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6d-00000009cLu-05q5 for linux-arm-kernel@bombadil.infradead.org; Mon, 15 Apr 2024 19:35:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=iMZCcGT0at/n2sdsTlaxf6HXRDJtJnjvmf8GQe8Iq6Q=; b=iCfFJND7G0CX7598omwNzfmmxp xMJqC83eKjZjgpVNABuT/lWlv27mCKb0IO1f1QjgFGtRkYFs2A3XqY3PBaVVBmruv5Qqdqm5lF3GX jgmlh8HJg5gZbL08PMIaad/Bh0/qQntQ4QuHXzrFvFtNcPUZY4oCIdSaqF3fxCNxYxldAGLJLeve4 FG40r6Obmj26knJnBcrGExRvdxHssMN7wba4AL+HToClC8tF+n52y+gFcz9Ma8c1WUhkl/vlc64Sz cpKWBKQi6ZPPlpcLGncBZKy86kGoKhYUpZrhCeXlhwPOiAnWFkeq4VbX4TCgRERDsJqVWeagKD+NA GCf9294w==; Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6W-0000000AimY-2RPM for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:35:05 +0000 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-78edc0f9636so160355385a.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=1713209698; x=1713814498; 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=iMZCcGT0at/n2sdsTlaxf6HXRDJtJnjvmf8GQe8Iq6Q=; b=fFf25N1WQyBeYVWem1bBuZV5YhE24VG3SIcnOLE6O6DcePV1ZigeJWhQIDuu8baOrh P4DMd5ab0dDRk68aZmItvF6wm6ZYDJF4YdQSifDbf3s6yvO9Ji8InOPMy61ZWT9AnXDh RBDsfq6xuSe25uQz6KhM+KV34bPz2XicQv8JU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209698; x=1713814498; 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=iMZCcGT0at/n2sdsTlaxf6HXRDJtJnjvmf8GQe8Iq6Q=; b=GaV0VZt8ZXHNV1ffBH1AjY/m6u8Tj6CEBGaSUS9zITDfWF/FSOlLvc1p/6xl3GX+iN mJBqfhJBce+XP0IOrlJZfqwEx9AYbGEX6xh2iAEubHxoZ+EL8biUx8qTyAWl2GhQ1StA bejYXAA4Mk51cdaG6eZBuFNAtU3qoZOYDJXUDh1JrtZC6qiK8uIz2imrZf8nKSC7pZmV vEWEgMUQnesLE4Hshtzw6c6IkDC6woZ6Bl1j5s9leIPvz3KZk5k0/ZU0errDR9pbe20f ImSqmkDDzt9rfJoLf6S2m/wAL4IKdJA38dxUAwK65+EroY+j+u7eVsjpmkUksVeKPVw8 RQ4A== X-Forwarded-Encrypted: i=1; AJvYcCXs2QjL76wFuyRWKHE8YHwmN8D04VvkFpgxJzTP69dYnd/McHkUzSbakxg9jDvWn7Vn1tqVp70NX2F/svnci496/GCzHZ/0Ag64zPJXhpdTBTUo4K0= X-Gm-Message-State: AOJu0YwKnu/sIAGDtHv0rQMU3oy5JOkpIH62f+Up+vvWyU34q+8FKmyQ +uLl9gOrKnKCuaq8EeXsiGQsQbbdKVayS55Om+1ns1ITh4ESfvrFFX9WXmadQQ== X-Google-Smtp-Source: AGHT+IH3ksUcYlN9cp0k1WPEjfsSCCPteMBHE8e8FR9KC+RBDbDTxTGGbvdceo3EwW9xNOFzS8IB7A== X-Received: by 2002:a05:620a:469f:b0:78d:66b6:a786 with SMTP id bq31-20020a05620a469f00b0078d66b6a786mr14598431qkb.35.1713209698470; Mon, 15 Apr 2024 12:34:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:58 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:44 +0000 Subject: [PATCH 27/35] media: dib0700: Refator return path MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-27-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_203501_366021_7A1E31EB X-CRM114-Status: GOOD ( 15.22 ) 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/usb/dvb-usb/dib0700_core.c:67:15-16: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/usb/dvb-usb/dib0700_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c index 1caabb51ea47..b2ad2d0f76f8 100644 --- a/drivers/media/usb/dvb-usb/dib0700_core.c +++ b/drivers/media/usb/dvb-usb/dib0700_core.c @@ -64,7 +64,9 @@ static int dib0700_ctrl_wr(struct dvb_usb_device *d, u8 *tx, u8 txlen) if (status != txlen) deb_data("ep 0 write error (status = %d, len: %d)\n",status,txlen); - return status < 0 ? status : 0; + if (status < 0) + return status; + return 0; } /* expecting tx buffer: request data[0] ... data[n] (n <= 4) */