Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3363587ybh; Mon, 16 Mar 2020 21:56:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vscURcqydbqYysYPoJeMHQzpNvRVJ5vM8NsRE4x3gfAEnPESIvXpACXSSIicQpSYuETergE X-Received: by 2002:a05:6808:3b3:: with SMTP id n19mr2245453oie.114.1584421016323; Mon, 16 Mar 2020 21:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584421016; cv=none; d=google.com; s=arc-20160816; b=BzbzXoZRIyc+jrpSKXdl0yhMe9hImXIIg0RLX/DUgZcJhC5/KEdG/p6KIUZhbcB2MB Ulgl2K77RRAX5Brq5fifW86Om9DJcbGkFpJifsqseuOlNmjIgw2TQgZK1l96C6j3rpsv SxozYdk7h2cxVfB3Yp199AtLnwc9iqFZ5h7wf2pFO+2bpReti7yOpRQI9J1/ecjQAq1o QN2P1SOCA7QhfiR5B/SFST+EiGxvbB81XQpiGwRSaRMJ8iRhx7kLJt4/y/Zd7Plz04dM No9zvGRinpfF2a+3eOTH/JhbwYyBP5j8MrLnO17ehbZXm2KlQfELP8b4u5cf8I0s2iap hEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Z/pLHqEymmI8qdYZpx02WBRLipjnKwZXZVqV8m8MSSY=; b=FVSXeFuePXKY1S/6+DnT2bBOAg/tpabiLZBNl7J+FJp+PIDXFHuvX2T5k8kRFJimnQ Xth6jBVD5XAhn7HuY6Jy+95YYczY9PEmNSbFfY0NEvawMkHoZhZwuEHUGBVV++u67c9+ iIQlqrlqasNPyT9aRnd/nOC8kMsX71MEiYJvz5oScaFSilnuOOVV1H+JHMdsAhB5kaGa d+McA2pNS7cyHNR1BAmEsQRE0oItx2lyUDL0DUs0RGQyXEqiNbCIWGLw/yvxOvc50RgP I3StMdp4yVLY0xzxWViq7CrB4ThVu+CWGoY3WkSWNR3MEic52s8rijH2MMymAtdRr8Ss hnUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Hu9yeveS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si1119581oij.162.2020.03.16.21.56.44; Mon, 16 Mar 2020 21:56:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Hu9yeveS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbgCQEyv (ORCPT + 99 others); Tue, 17 Mar 2020 00:54:51 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37070 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726669AbgCQEyu (ORCPT ); Tue, 17 Mar 2020 00:54:50 -0400 Received: by mail-wm1-f65.google.com with SMTP id a141so20416048wme.2 for ; Mon, 16 Mar 2020 21:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=Z/pLHqEymmI8qdYZpx02WBRLipjnKwZXZVqV8m8MSSY=; b=Hu9yeveSk7lvKAgkYqMZGbJjupqBFlO1hDJJn/f26IzkoN9kOnt+c1715OgLvVXhX6 SIXcVljSb2WE4ejla8A/dMxdUYQiO1PDZlEEa1fiKMEqWZho5cMEJYzTCs2sbjlRn+bg 0AQ/kJixJH546JWh2HbJ63TNz4z5jQgMIAvwk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Z/pLHqEymmI8qdYZpx02WBRLipjnKwZXZVqV8m8MSSY=; b=uHEm9+YKzMddGLEe/5oNXQSXXFz4i3H9QtT7jnGiW+myfH5877KU5HvC68Xs9/RPUh BFzlTPt8729gi0DDRkuwYg3zIu4ESiYn6DEmirF5/n3qvxSTJsctJ096vgPxuhBhw0G4 XALMuTvzf7463h0DCDUwJTNHfyturYjFJ1rWfzgWnaNyIcm+W3Pbf4izBN7rOJtrK3RJ KK5j5z+h+0HnCA9qRJC4m8HPnlEZiH6huxBVbZml8KxzBMPsCEFQb3UqgJ/9kU2i1peZ 9ate/vUd9p0W6sKjSQ28j/ZzrSu/JFAUMw+kjur7JCc2gJnQTkczSVA824FxzhKl76Wl OlnQ== X-Gm-Message-State: ANhLgQ3NT84DZBmZ/QCsJgYZlbMgzi2Yz6Gkc8NwA/azqkbXEUXKuSVD Kw54pkxwLxunkxnU9ROdJWp1Ug== X-Received: by 2002:a1c:7207:: with SMTP id n7mr2819390wmc.138.1584420888626; Mon, 16 Mar 2020 21:54:48 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id i67sm2874498wri.50.2020.03.16.21.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 21:54:47 -0700 (PDT) From: Rayagonda Kokatanur To: Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , davem@davemloft.net, Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Arun Parameswaran , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Rayagonda Kokatanur Subject: [PATCH v1 1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value Date: Tue, 17 Mar 2020 10:24:35 +0530 Message-Id: <20200317045435.29975-1-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Check clk_prepare_enable() return value. Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") Signed-off-by: Rayagonda Kokatanur --- drivers/net/phy/mdio-mux-bcm-iproc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio-mux-bcm-iproc.c b/drivers/net/phy/mdio-mux-bcm-iproc.c index 88d409e48c1f..aad6809ebe39 100644 --- a/drivers/net/phy/mdio-mux-bcm-iproc.c +++ b/drivers/net/phy/mdio-mux-bcm-iproc.c @@ -288,8 +288,13 @@ static int mdio_mux_iproc_suspend(struct device *dev) static int mdio_mux_iproc_resume(struct device *dev) { struct iproc_mdiomux_desc *md = dev_get_drvdata(dev); + int rc; - clk_prepare_enable(md->core_clk); + rc = clk_prepare_enable(md->core_clk); + if (rc) { + dev_err(md->dev, "failed to enable core clk\n"); + return rc; + } mdio_mux_iproc_config(md); return 0; -- 2.17.1