Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3688400lfo; Mon, 23 May 2022 11:29:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1nS9HrXP0o2b8mKHBImRtmgiVlOEqnm1PHdJw5VNysFA9hk0aCzR1ZbMJJx37q0LL8vuv X-Received: by 2002:aa7:9110:0:b0:4fa:e388:af57 with SMTP id 16-20020aa79110000000b004fae388af57mr24509963pfh.1.1653330576684; Mon, 23 May 2022 11:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653330576; cv=none; d=google.com; s=arc-20160816; b=heL4OyQwXF79Lp3XzNdZQNAWw0gOP70UPjcHkAZ3+XnQMs7BG/rSVE6DgxxqtDaJy1 9Wb+R2NLBiy7rHiaza/GRDAtEltW1ptbMSEv2P2HnZumPqMDCvyuwO5hS8gcBvscoYQb UrdPFJCsIWpF0IKRdpeZHwj1QQcB876d0VhWTkRroLHiaUHtcn9OiIM3D/d2H/olSXV/ hJYy2lUQZ6df3zWcQee+VibEslC6THnQN31IKi1gHH5XpnWmKse51983TMRIlgr6X6GK ELiaq5tS8QXZIVK2FF0YGTxgtNra8Kan4i8s1IQ+Zxgw1ve2TzXlPYWA27RJXUpEENFM qAPQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zAzwFaUMj6RfwU3O21Z5XUdv3IARGVpT8SlPe36iHbc=; b=CekWwMmoSx9aS92b+PLtkkIhp/3VlWLuzbkzCf9C3qU2PkohLiuOoLqCMEnVMp5H0e jeu+d3J/URiWYXZQlPU0Oz0/rx9p1GWRXC9l+mzwtYyjKaqetkp6dhW7az/eJGW1uquE i6U4Kr5AuL53hO/f86GymrE5h4W1OCRSoSOPOHJKxfubEMNxxL7RLB0+kkfYON4g2dwr QvTcktzm/0tJWPYRBTXd9H57KT8ZBzHqwR1nxf4lz3HsMeXqCKDWoYoFubgO3X37FStv dRxNUBqTkQxvYUwhnvdftQ5jGWfKS4s/P98K73rU2hra/Vtie6hvYcrZ4kIObVovhA+r A3LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fLUWKHwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q16-20020a170902edd000b00158f04afd74si10210467plk.146.2022.05.23.11.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:29:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fLUWKHwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0832135681; Mon, 23 May 2022 11:29:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241271AbiEWSDG (ORCPT + 99 others); Mon, 23 May 2022 14:03:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241330AbiEWRfJ (ORCPT ); Mon, 23 May 2022 13:35:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F8998217E; Mon, 23 May 2022 10:28:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF7DBB81219; Mon, 23 May 2022 17:28:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F53CC3411D; Mon, 23 May 2022 17:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326899; bh=6/+AtATp5I5eZRQNupUjuNlrDcvNHti0LxiGEAq67F8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fLUWKHweqyRjr3j3g0sckes1SuFVsKXbXLvUmmsGVBi3ZkW56comfZsdNgxIJ0vYx 7QB3zKMX2dtECl7nh5MEfsxeFZeRzqauGXmKxI3OmszJB1SQ8Dkg2ECGDur2tZQERd 4MroTt5gdjjFVp3zvhenW1zPwusQ98qI43AbXoAI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Florian Fainelli , Paolo Abeni , Sasha Levin Subject: [PATCH 5.17 092/158] net: systemport: Fix an error handling path in bcm_sysport_probe() Date: Mon, 23 May 2022 19:04:09 +0200 Message-Id: <20220523165846.444642721@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165830.581652127@linuxfoundation.org> References: <20220523165830.581652127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit ef6b1cd11962aec21c58d137006ab122dbc8d6fd ] if devm_clk_get_optional() fails, we still need to go through the error handling path. Add the missing goto. Fixes: 6328a126896ea ("net: systemport: Manage Wake-on-LAN clock") Signed-off-by: Christophe JAILLET Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/99d70634a81c229885ae9e4ee69b2035749f7edc.1652634040.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bcmsysport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c index 60dde29974bf..df51be3cbe06 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -2585,8 +2585,10 @@ static int bcm_sysport_probe(struct platform_device *pdev) device_set_wakeup_capable(&pdev->dev, 1); priv->wol_clk = devm_clk_get_optional(&pdev->dev, "sw_sysportwol"); - if (IS_ERR(priv->wol_clk)) - return PTR_ERR(priv->wol_clk); + if (IS_ERR(priv->wol_clk)) { + ret = PTR_ERR(priv->wol_clk); + goto err_deregister_fixed_link; + } /* Set the needed headroom once and for all */ BUILD_BUG_ON(sizeof(struct bcm_tsb) != 8); -- 2.35.1