From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Yihao Han <hanyihao@vivo.com>,
Hans de Goede <hdegoede@redhat.com>, Helge Deller <deller@gmx.de>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.9 07/30] video: fbdev: simplefb: Check before clk_put() not needed
Date: Mon, 26 Sep 2022 12:11:38 +0200 [thread overview]
Message-ID: <20220926100736.416842592@linuxfoundation.org> (raw)
In-Reply-To: <20220926100736.153157100@linuxfoundation.org>
From: Yihao Han <hanyihao@vivo.com>
[ Upstream commit 5491424d17bdeb7b7852a59367858251783f8398 ]
clk_put() already checks the clk ptr using !clk and IS_ERR()
so there is no need to check it again before calling it.
Signed-off-by: Yihao Han <hanyihao@vivo.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/simplefb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index 61f799a515dc..1efdbbc20f99 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -231,8 +231,7 @@ static int simplefb_clocks_init(struct simplefb_par *par,
if (IS_ERR(clock)) {
if (PTR_ERR(clock) == -EPROBE_DEFER) {
while (--i >= 0) {
- if (par->clks[i])
- clk_put(par->clks[i]);
+ clk_put(par->clks[i]);
}
kfree(par->clks);
return -EPROBE_DEFER;
--
2.35.1
next prev parent reply other threads:[~2022-09-26 10:17 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 10:11 [PATCH 4.9 00/30] 4.9.330-rc1 review Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 01/30] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 02/30] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 03/30] drm/vc4: crtc: Use an union to store the page flip callback Greg Kroah-Hartman
2022-09-26 10:38 ` Pavel Machek
2022-09-26 16:11 ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 04/30] video: fbdev: skeletonfb: Fix syntax errors in comments Greg Kroah-Hartman
2022-09-26 10:28 ` Pavel Machek
2022-09-26 13:46 ` Bagas Sanjaya
2022-09-26 16:06 ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 05/30] video: fbdev: intelfb: Use aperture size from pci_resource_len Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 06/30] video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write Greg Kroah-Hartman
2022-09-26 10:11 ` Greg Kroah-Hartman [this message]
2022-09-26 10:29 ` [PATCH 4.9 07/30] video: fbdev: simplefb: Check before clk_put() not needed Pavel Machek
2022-09-26 16:09 ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 08/30] mips: lantiq: falcon: Fix refcount leak bug in sysctrl Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 09/30] mips: lantiq: xway: " Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 10/30] mips/pic32/pic32mzda: Fix refcount leak bugs Greg Kroah-Hartman
2022-09-26 10:40 ` Pavel Machek
2022-09-26 16:08 ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 11/30] mips: lantiq: Add missing of_node_put() in irq.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 12/30] arm: mach-spear: Add missing of_node_put() in time.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 13/30] wifi: mac80211: Fix UAF in ieee80211_scan_rx() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 14/30] USB: core: Fix RST error in hub.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 15/30] ALSA: hda/tegra: set depop delay for tegra Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 16/30] ALSA: hda: add Intel 5 Series / 3400 PCI DID Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 17/30] mm/slub: fix to return errno if kmalloc() fails Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 18/30] netfilter: nf_conntrack_sip: fix ct_sip_walk_headers Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 19/30] netfilter: nf_conntrack_irc: Tighten matching on DCC message Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 20/30] ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 21/30] net: team: Unsync device addresses on ndo_stop Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 22/30] MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 23/30] can: gs_usb: gs_can_open(): fix race dev->can.state condition Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 24/30] perf kcore_copy: Do not check /proc/modules is unchanged Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 25/30] net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 26/30] serial: Create uart_xmit_advance() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 27/30] serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 28/30] s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.9 29/30] Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.9 30/30] ext4: make directory inode spreading reflect flexbg size Greg Kroah-Hartman
2022-09-26 13:35 ` [PATCH 4.9 00/30] 4.9.330-rc1 review Pavel Machek
2022-09-27 1:02 ` Shuah Khan
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=20220926100736.416842592@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=deller@gmx.de \
--cc=hanyihao@vivo.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).