From: Gregory CLEMENT <gregory.clement@bootlin.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Mathias Nyman <mathias.nyman@intel.com>, linux-usb@vger.kernel.org Cc: "Jason Cooper" <jason@lakedaemon.net>, "Andrew Lunn" <andrew@lunn.ch>, "Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>, "Gregory CLEMENT" <gregory.clement@bootlin.com>, "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>, linux-arm-kernel@lists.infradead.org, "Antoine Tenart" <antoine.tenart@bootlin.com>, "Miquèl Raynal" <miquel.raynal@bootlin.com>, "Nadav Haklai" <nadavh@marvell.com>, "Shadi Ammouri" <shadi@marvell.com>, "Omri Itach" <omrii@marvell.com>, "Hanna Hawa" <hannah@marvell.com>, "Igal Liberman" <igall@marvell.com>, "Marcin Wojtas" <mw@semihalf.com> Subject: [1/2] usb: host: xhci-plat: Remove useless test before clk_disable_unprepare Date: Wed, 14 Feb 2018 17:16:19 +0100 [thread overview] Message-ID: <20180214161620.4401-2-gregory.clement@bootlin.com> (raw) clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> --- drivers/usb/host/xhci-plat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 6f038306c14d..79afaac57ef6 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -319,8 +319,7 @@ static int xhci_plat_probe(struct platform_device *pdev) usb_put_hcd(xhci->shared_hcd); disable_clk: - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); put_hcd: usb_put_hcd(hcd); @@ -346,8 +345,7 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(xhci->shared_hcd); - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); usb_put_hcd(hcd); pm_runtime_set_suspended(&dev->dev);
WARNING: multiple messages have this Message-ID (diff)
From: gregory.clement@bootlin.com (Gregory CLEMENT) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] usb: host: xhci-plat: Remove useless test before clk_disable_unprepare Date: Wed, 14 Feb 2018 17:16:19 +0100 [thread overview] Message-ID: <20180214161620.4401-2-gregory.clement@bootlin.com> (raw) In-Reply-To: <20180214161620.4401-1-gregory.clement@bootlin.com> clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> --- drivers/usb/host/xhci-plat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 6f038306c14d..79afaac57ef6 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -319,8 +319,7 @@ static int xhci_plat_probe(struct platform_device *pdev) usb_put_hcd(xhci->shared_hcd); disable_clk: - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); put_hcd: usb_put_hcd(hcd); @@ -346,8 +345,7 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(xhci->shared_hcd); - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); usb_put_hcd(hcd); pm_runtime_set_suspended(&dev->dev); -- 2.15.1
next reply other threads:[~2018-02-14 16:16 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-02-14 16:16 Gregory CLEMENT [this message] 2018-02-14 16:16 ` [PATCH 1/2] usb: host: xhci-plat: Remove useless test before clk_disable_unprepare Gregory CLEMENT -- strict thread matches above, loose matches on Subject: below -- 2018-03-14 15:56 [2/2] usb: host: xhci-plat: Fix clock resource by adding a register clock Gregory CLEMENT 2018-03-14 15:56 ` [PATCH 2/2] " Gregory CLEMENT 2018-02-28 16:24 [2/2] " Gregory CLEMENT 2018-02-28 16:24 ` [PATCH 2/2] " Gregory CLEMENT 2018-02-28 16:09 [2/2] " Manu Gautam 2018-02-28 16:09 ` [PATCH 2/2] " Manu Gautam 2018-02-14 16:16 [PATCH 0/2] Allow xhci-plat using a second clock Gregory CLEMENT 2018-02-14 16:16 ` [2/2] usb: host: xhci-plat: Fix clock resource by adding a register clock Gregory CLEMENT 2018-02-14 16:16 ` [PATCH 2/2] " Gregory CLEMENT 2018-02-28 16:05 ` [2/2] " Mathias Nyman 2018-02-28 16:05 ` [PATCH 2/2] " Mathias Nyman 2018-03-13 10:58 ` Gregory CLEMENT 2018-02-28 14:02 ` [PATCH 0/2] Allow xhci-plat using a second clock Gregory CLEMENT 2018-04-18 14:20 ` Gregory CLEMENT 2018-04-19 5:59 ` Mathias Nyman 2018-04-19 13:43 ` Gregory CLEMENT
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180214161620.4401-2-gregory.clement@bootlin.com \ --to=gregory.clement@bootlin.com \ --cc=andrew@lunn.ch \ --cc=antoine.tenart@bootlin.com \ --cc=gregkh@linuxfoundation.org \ --cc=hannah@marvell.com \ --cc=igall@marvell.com \ --cc=jason@lakedaemon.net \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-usb@vger.kernel.org \ --cc=mathias.nyman@intel.com \ --cc=miquel.raynal@bootlin.com \ --cc=mw@semihalf.com \ --cc=nadavh@marvell.com \ --cc=omrii@marvell.com \ --cc=sebastian.hesselbarth@gmail.com \ --cc=shadi@marvell.com \ --cc=thomas.petazzoni@bootlin.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.