From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E1728472 for ; Mon, 11 Sep 2023 14:35:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E5D6C433C9; Mon, 11 Sep 2023 14:35:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694442928; bh=IKIhk2F3jHeY7OftrYuO3p4qg2FepWdzRMD3WOscyis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9MaG7AeO7g5WgPEMvfid6nv2TsfM9XQqzxlo1rAzcsTww5OZJSXYcwmPeDGBhvcz F8Tse0pIiRE67wp8g3j+iHySmk2r8RldAyHSRtNYMtwZRm1YQYC/RhgPKvvn0a4TDs QbDtEDSQTvx9vOR0BmfZm2zTasO075Gx5QmG9Ndw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuanjun Gong , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.4 197/737] Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() Date: Mon, 11 Sep 2023 15:40:56 +0200 Message-ID: <20230911134656.104048224@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134650.286315610@linuxfoundation.org> References: <20230911134650.286315610@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuanjun Gong [ Upstream commit e8b5aed31355072faac8092ead4938ddec3111fd ] in nokia_bluetooth_serdev_probe(), check the return value of clk_prepare_enable() and return the error code if clk_prepare_enable() returns an unexpected value. Fixes: 7bb318680e86 ("Bluetooth: add nokia driver") Signed-off-by: Yuanjun Gong Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- drivers/bluetooth/hci_nokia.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_nokia.c b/drivers/bluetooth/hci_nokia.c index 05f7f6de6863d..97da0b2bfd17e 100644 --- a/drivers/bluetooth/hci_nokia.c +++ b/drivers/bluetooth/hci_nokia.c @@ -734,7 +734,11 @@ static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev) return err; } - clk_prepare_enable(sysclk); + err = clk_prepare_enable(sysclk); + if (err) { + dev_err(dev, "could not enable sysclk: %d", err); + return err; + } btdev->sysclk_speed = clk_get_rate(sysclk); clk_disable_unprepare(sysclk); -- 2.40.1