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 1D89BCE79D0 for ; Wed, 20 Sep 2023 12:12:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235421AbjITMMi (ORCPT ); Wed, 20 Sep 2023 08:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235445AbjITMMh (ORCPT ); Wed, 20 Sep 2023 08:12:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5E8AD for ; Wed, 20 Sep 2023 05:12:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17C81C433C7; Wed, 20 Sep 2023 12:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695211950; bh=vgHg34Chu1thQ2saepaksVXcGqCcmf/q9Dy6xweReAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rmZYw1oCt9S7uVTdTiPq3nw2/DAihuOhvQ4ySPLwX7wH2RHAwzwuIUPLgFoQ+/S3Z jqyUCMauNNoX0ETLM34rgK36qWaUoPHeI2OMgAw6P0vTgqgFiM2ovOXk/tcNRielWN BPEJ73tifhN0vLgAev4kaM1LCbi4U4XmmNrtBQSg= 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 4.19 059/273] Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() Date: Wed, 20 Sep 2023 13:28:19 +0200 Message-ID: <20230920112848.268328574@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112846.440597133@linuxfoundation.org> References: <20230920112846.440597133@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 4.19-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 2dc33e65d2d0c..5f6c6930b5bdf 100644 --- a/drivers/bluetooth/hci_nokia.c +++ b/drivers/bluetooth/hci_nokia.c @@ -743,7 +743,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