From patchwork Tue Oct 24 13:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Arefev X-Patchwork-Id: 157438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1934516vqx; Tue, 24 Oct 2023 06:17:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtz4yIO7D0VoGh5DZROT6yL36Q4uP3gFPCMaMF1+QoyP3zEjeft8tZvDT0b6lzaBW7oQdn X-Received: by 2002:a05:6a20:440b:b0:159:f884:4d6e with SMTP id ce11-20020a056a20440b00b00159f8844d6emr3263408pzb.40.1698153435064; Tue, 24 Oct 2023 06:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698153435; cv=none; d=google.com; s=arc-20160816; b=QLJFFHgXG2MjuHFL2UdaTolSXzgzx0xuj1kOlovHWtg5gJuG59EMxO9Cj1tYlUKlRm 3JGN/eBlEipndHJmxNP5kp5aTOgQ1HqXpHmQUwUNwozX2t1dloFBIg7ZQMC6/+JFkS/a sIBSivNIf9DdsGIzBCKd/aGF9ARMZfHTxxUnWHrz/2RL9VPaM2AzTLE0rNtkbNMrKrJ7 KnAQASnXTVl6RMqGgqMUKyA67iPgWXT0cSGbXL9tv7I1U15DSCDfVDqX9K1fV0erl5MN 2AoYdnyoiLgqAgiifbJOEV8nPNZWlUNsNrM4PL7coLgsWNXkl4NEn07pTtF3hEx5qrhj Grfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:from; bh=hXmr2tFx6UpqbD02yGf2BN9YhkOrEZYGzBXYckcZFSs=; fh=m9U41HBE77wzvb88aNGi/HSeyeyq7jJS3pMZn5lW60E=; b=Pyi9A55O0WlAieYGjZu46Y0EsMVv690ObdoAHli7gt5xEudJLD/O9Chewoglebg7gC cx/RTOQ/n4mLqShvGhGqec7UZXGGKHmwCb4k7PynMciJCI2x9lmXViH/ep+O5gLwIQjA KD4eoW+xzKgXhk7B46cU3D+AfOxt/EQizFBjFqf8pbS6KFI1SMVmxQTI5j5aQQvhBUxT d5/q8QdhpjBJyIdRqoEnibxfgtVf+mvD+Y3jImngbox3AloqhSB/ri3FPIXDjeLjDqMF S74l/vtyEM9PijA/eeTEoHJX/PFEqWqtb0ZU01u+jNjxHQb/Y0SnLKqo6nWjoDYNlc1R +LJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@swemel.ru header.s=mail header.b=L8xQxTyg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=swemel.ru Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id t16-20020a639550000000b005af44ed3148si8241008pgn.367.2023.10.24.06.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@swemel.ru header.s=mail header.b=L8xQxTyg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=swemel.ru Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 577BA807EB16; Tue, 24 Oct 2023 06:17:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234231AbjJXNQ7 (ORCPT + 26 others); Tue, 24 Oct 2023 09:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232084AbjJXNQ6 (ORCPT ); Tue, 24 Oct 2023 09:16:58 -0400 X-Greylist: delayed 452 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 24 Oct 2023 06:16:53 PDT Received: from mx.swemel.ru (mx.swemel.ru [95.143.211.150]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80E8CC2; Tue, 24 Oct 2023 06:16:53 -0700 (PDT) From: Denis Arefev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swemel.ru; s=mail; t=1698152956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=hXmr2tFx6UpqbD02yGf2BN9YhkOrEZYGzBXYckcZFSs=; b=L8xQxTygCr/5WGn6hUiQF+9uJAo1fbJO4Qqu9OIoSozVN/Fiuoaw3vA+mrkeUXSuKChb4p IUNB0Z8sVPN1vvf9RrosmqdifQ44gJinOEoArbp0P9wan8uRVgtgpJJq/TUULhbJCwHnpL yMLFN5NE+d1hIANTIfl2BQ4pPVjxy4Q= To: Mauro Carvalho Chehab Cc: Sakari Ailus , Laurent Pinchart , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] media: marvell: Added function return value check clk_prepare Date: Tue, 24 Oct 2023 16:09:16 +0300 Message-Id: <20231024130916.19419-1-arefev@swemel.ru> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 06:17:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780642936050974727 X-GMAIL-MSGID: 1780642936050974727 Return value of function 'clk_prepare', called at mcam-core.c:905, is not checked, but it is usually checked for this function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/media/platform/marvell/mcam-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/marvell/mcam-core.c b/drivers/media/platform/marvell/mcam-core.c index 66688b4aece5..afb7f4009d96 100644 --- a/drivers/media/platform/marvell/mcam-core.c +++ b/drivers/media/platform/marvell/mcam-core.c @@ -901,9 +901,10 @@ static void mcam_ctlr_power_down(struct mcam_camera *cam) static int mclk_prepare(struct clk_hw *hw) { struct mcam_camera *cam = container_of(hw, struct mcam_camera, mclk_hw); - - clk_prepare(cam->clk[0]); - return 0; + int ret; + + ret = clk_prepare(cam->clk[0]); + return ret; } static void mclk_unprepare(struct clk_hw *hw)