From patchwork Mon Apr 15 19:34:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 789083 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 47380161338 for ; Mon, 15 Apr 2024 19:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; cv=none; b=N2Njdl3e6x3pIZ6s76wgmRLQP6GfGHByBsdCxj3UL21ebmyV7ZwySSGVjwwbe/5PBRXLM+7hnbCloQdDETM+uGCjM+4pULphRFwwtA/BrKn6n9V/9HCvuRCzUnklrlEJhbfZ9kzmKrY8jYcMIgAjyhBhoBXKKKGZNlw7n0tvxwI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; c=relaxed/simple; bh=z4PclDFur+vwHypm0cCW/dzU3Xu+onrV7HrMrh+lG0w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ORXqN20kq2EN42hqu/Kfm30w6ZQkJrs0iW+OQ175hwhCa+vBeh7Q1f5KlqpW5FHVWn07ETNvlCG+diCuNTda8IOrZwe7+eH3olPXRC3C3EOFXAeHlgG+gNpWLz/qlLhc52EBf2QnzAyAN32awPwWm21e8Se5nQ8uqQ65BLbRjFM= 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=DqbHWcPu; arc=none smtp.client-ip=209.85.222.177 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="DqbHWcPu" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-78d777d7d1fso282209685a.1 for ; Mon, 15 Apr 2024 12:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209697; x=1713814497; 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=9iRxS0Wfwa66zl/9FdFOMvCFtgSuuwnNLZrwXVx0B2s=; b=DqbHWcPudgXbV5rqyt0Jq160y0ubkuqh5LNrVOJcdO2eloQfX+II1f0JTZzaEHtaqv TtiOJUo7VrMcmiZHF4bwB9yOibEiAzxMRyTJ2amoMTDD3tB75C/Hd8o2xffzsmkyTOw3 qUXqOstHE/lkHdfLJTKlryzL8AEkc/YY88RDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209697; x=1713814497; 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=9iRxS0Wfwa66zl/9FdFOMvCFtgSuuwnNLZrwXVx0B2s=; b=TJr52ED6QF5BCpROtnIDKZMybiwWsARs5NPnq2SRv1dkqZbyN4BLQjpUEqUZEh9hCD c1ZUEH6B7aeBzWR3SAlIbfsuWZ/yQ8V7+2cXkth2RRnYEZInYpAMaodNnXrNHiE+mnBD XUS27HUkMMrNTjITEgMV2oySKU3B5kMgtfyO5OD4D2ZFBiowijj6yqQe0QWNqEPrX54J JJ6IS83LNHoPR+cRWO0c7rlohXKa/3r71Hnks9lP7W/vu5ROfgs4yYoS8oTzR8SX8Qrz QDuMTEkqo4ZKx93HOfTRyHhwOHSOxc2gyRrvbe3qERA6P1qkPPmWoS+shr9ZpIuBgjvP GEcg== X-Gm-Message-State: AOJu0YyJh39YH00yKaCo+8phkqNKPpdfrnlD+XPI+i7ktLJCuAvuVo2d FYD0lt12a+JxfKCo/86pQ7wrJXhQ/gtm6FS36LEouFkPHf+9r01mIdi0H16l/w== X-Google-Smtp-Source: AGHT+IGwiJ5/vTLqYTTLWbehOkrG3Z1CC3Ai73ckOtHPinOfOxtyAdhFhhrjbccK1nhZt1UUqJLF7A== X-Received: by 2002:a37:e10a:0:b0:78e:d2a6:63e0 with SMTP id c10-20020a37e10a000000b0078ed2a663e0mr9260421qkm.4.1713209697430; Mon, 15 Apr 2024 12:34:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:57 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:43 +0000 Subject: [PATCH 26/35] media: venus: Refator return path Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-26-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/platform/qcom/venus/vdec.c:672:12-13: WARNING opportunity for min() drivers/media/platform/qcom/venus/vdec.c:650:12-13: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/vdec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 1dffeb7de76e..2bc7aecb35e5 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -647,7 +647,9 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend) mutex_unlock(&core->pm_lock); - return ret < 0 ? ret : 0; + if (ret < 0) + return ret; + return 0; } static int vdec_pm_get_put(struct venus_inst *inst) @@ -669,7 +671,9 @@ static int vdec_pm_get_put(struct venus_inst *inst) error: mutex_unlock(&core->pm_lock); - return ret < 0 ? ret : 0; + if (ret < 0) + return ret; + return 0; } static void vdec_pm_touch(struct venus_inst *inst)