diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-05-10 19:28:04 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-12 11:36:46 +0200 |
commit | b92d8a6e935fbd586397341ac1cb6762b041c6d5 (patch) | |
tree | d2ce3bf80375fd65637e284d3f571f4792df54d9 /drivers/usb | |
parent | 84db2ee2370332240a5e562779862b564fb9d49a (diff) | |
download | linux-b92d8a6e935fbd586397341ac1cb6762b041c6d5.tar.bz2 |
USB: c67x00: remove unnecessary check of res
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>
Link: https://lore.kernel.org/r/20220510112804.2401150-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/c67x00/c67x00-drv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index 53838e7d4eef..6db5cb1b2dbb 100644 --- a/drivers/usb/c67x00/c67x00-drv.c +++ b/drivers/usb/c67x00/c67x00-drv.c @@ -189,14 +189,12 @@ static int c67x00_drv_remove(struct platform_device *pdev) c67x00_ll_release(c67x00); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (res) - free_irq(res->start, c67x00); + free_irq(res->start, c67x00); iounmap(c67x00->hpi.base); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res) - release_mem_region(res->start, resource_size(res)); + release_mem_region(res->start, resource_size(res)); kfree(c67x00); |