From patchwork Thu Oct 5 16:47:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13410447 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BCC6E71D4F for ; Thu, 5 Oct 2023 16:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=VqF2qS260twEsWq07dHXlRb4InKro948+3/EMeZ3xcQ=; b=Yd1 g9yAx0SRpiDyeFpLC70yoBBzoHGCcmYVp1nzKgRnDUWQoclU8G5GZ+O6YQ0P6IuMVgMNQV2F8avrX M1/gtATvt31vJVFBSKeNsXVv/fL4+tl44dTQ52ybnYOfkqOVQgOAQc2gRSeLqm+1WmmRO71KifYVW dipfAuRr+sp6k2ZVe0CbmzDU5s289I9IL0WjICFjYJ+IuKJfMutO5CEC1zjhCUwqMUBVC/OG9qg2a ej9G+r1bSWdYbT64OqjsiwyxUg4CRA8kD12Ukr8K6TvevbTBaWfqHmvOgfgjPfl/WM2HNuftUkjQ5 Nkd04PRPpDFEvDEDpnvctD0Buk/HnuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoRW6-0047dy-20; Thu, 05 Oct 2023 16:48:02 +0000 Received: from mail-yb1-xb34.google.com ([2607:f8b0:4864:20::b34]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoRW2-0047bJ-39 for linux-arm-kernel@lists.infradead.org; Thu, 05 Oct 2023 16:48:00 +0000 Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-d8673a90f56so1308637276.0 for ; Thu, 05 Oct 2023 09:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1696524459; x=1697129259; darn=lists.infradead.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ME050m9OD0eTUAPBZvAUU9oe7rFm8L/c9WGrlPjVLOo=; b=YOPWd2FhmUNLtiIO2I1Tkaxz+rmBDEiqVT4XVhxHgEZwWF8Qf8hn0Ejb5L5xZSquDy KH0VcPKFnyJOEHKehzqtmPOqzir9ZzyMrIJbwffEoAsi4j+SeDbSMb1Bm9+cc5fZtTsX 3SkRKj460tfCSquJ02qvsCzKKwViihjbjXb6M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696524459; x=1697129259; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ME050m9OD0eTUAPBZvAUU9oe7rFm8L/c9WGrlPjVLOo=; b=MdHCncNtRX0mw9kYVsmZ6PveIRAHEwbfFMlvUkLc0s3M0omYkTPQCGE6m9qIpKyBtv 9n8WOB3r76z5vOHoIwINxavDbhuaQntqBkEJTxlrkjSZGxUy29zzhTW7HPowiQYxcpdc Ct79qp7PJTsCcQh6/frelCixpCNNYkhFBOukYBpxR0Nvk61BV3ptVPI5kAl9s8DrP1p9 89r38R+OGC2XQOy4+3LmwNuhdNrNbozNM5jQpKBqmcuXiYVbQ+2M7VL/5oZ87lyznQCT BjZvRtpbyOk9+rOA3ojb3eSpWnwPD1Y5u+AYTyt1BKsSIRcOWphTM8BUTN7c2b71mw0A imZw== X-Gm-Message-State: AOJu0Yy2CFkccSX98p+ttZXikRPpoh+MVj/keo5HOHi/HSp6V3aBkZyQ WOerfsUu39DnFSO6XW25+gkt5cGYZMweewjE0vA= X-Google-Smtp-Source: AGHT+IHUvbeX/9TMTGXpNeMZiRb9jaigp92I+hDJiGNTjvImbmpxdtAVzNB0BDPzxvh0h2OlThcAVA== X-Received: by 2002:a25:8b84:0:b0:d09:34f4:6698 with SMTP id j4-20020a258b84000000b00d0934f46698mr4993619ybl.36.1696524458725; Thu, 05 Oct 2023 09:47:38 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x15-20020a0ce0cf000000b0065b2e561c17sm623761qvk.123.2023.10.05.09.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:47:38 -0700 (PDT) From: Florian Fainelli To: linux-pwm@vger.kernel.org Cc: Florian Fainelli , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Thierry Reding , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] pwm: brcmstb: Checked clk_prepare_enable() return value Date: Thu, 5 Oct 2023 09:47:27 -0700 Message-Id: <20231005164728.1846726-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231005_094759_035957_2E22A072 X-CRM114-Status: GOOD ( 13.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Check the clk_prepare_enable() return value and propagate it. Suggested-by: Uwe Kleine-König Signed-off-by: Florian Fainelli Reviewed-by: Uwe Kleine-König --- This change depends upon: https://lore.kernel.org/all/20231004175414.1738475-1-florian.fainelli@broadcom.com/ drivers/pwm/pwm-brcmstb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c index a7d529bf76ad..de9cbda2e4ff 100644 --- a/drivers/pwm/pwm-brcmstb.c +++ b/drivers/pwm/pwm-brcmstb.c @@ -297,9 +297,7 @@ static int brcmstb_pwm_resume(struct device *dev) { struct brcmstb_pwm *p = dev_get_drvdata(dev); - clk_prepare_enable(p->clk); - - return 0; + return clk_prepare_enable(p->clk); } #endif