summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-09 16:53:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-12 10:03:16 +0200
commit3ddde5aa43cf302aa8ac6d4d5fa6166a09bb0a00 (patch)
tree1988257e156f096919a587c0f54943eff5f03225 /drivers/usb/host
parentbb8dc3df68a9f3d11400482d01ce7d241093ef7a (diff)
downloadlinux-stable-3ddde5aa43cf302aa8ac6d4d5fa6166a09bb0a00.tar.gz
linux-stable-3ddde5aa43cf302aa8ac6d4d5fa6166a09bb0a00.tar.bz2
linux-stable-3ddde5aa43cf302aa8ac6d4d5fa6166a09bb0a00.zip
USB: ohci-sm501: remove unnecessary check of mem
The resource is checked in probe function, so there is no need do this check in remove function. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20230809085348.2761782-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-sm501.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index 0468eeb4fcfd..4b39e9d6f33a 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -195,8 +195,7 @@ static void ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (mem)
- release_mem_region(mem->start, resource_size(mem));
+ release_mem_region(mem->start, resource_size(mem));
/* mask interrupts and disable power */