From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89076CE79CE for ; Wed, 20 Sep 2023 12:28:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234472AbjITM2w (ORCPT ); Wed, 20 Sep 2023 08:28:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234541AbjITM2u (ORCPT ); Wed, 20 Sep 2023 08:28:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF4EA3 for ; Wed, 20 Sep 2023 05:28:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B7E7C433C7; Wed, 20 Sep 2023 12:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695212923; bh=m5cWhDpcnQQBd9grNe3y9E7lygOQTUnQVnmaCAMMcHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xk4UUaLQ4fwEboYnX1m0DIeOv5ZSAZfP3Q9ypKUmys4VVah4vd15fGMRCl2g57NVU St8lBecDs2406rKlGJzuDYPhoRXHPVyepjcgM2zR0xgNT7TnqMJbBs7+vDrPX/LbXv PvdZveqDm0oz+yk7Ws4BiH01LOW1iLVDP0RaISeI= 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 5.4 069/367] Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() Date: Wed, 20 Sep 2023 13:27:26 +0200 Message-ID: <20230920112900.302241178@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112858.471730572@linuxfoundation.org> References: <20230920112858.471730572@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.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 6463350b79779..82db15585196a 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