From: Yang Yingliang Date: Tue, 10 May 2022 11:28:04 +0000 (+0800) Subject: USB: c67x00: remove unnecessary check of res X-Git-Tag: v6.1-rc5~1161^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b92d8a6e935fbd586397341ac1cb6762b041c6d5;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20220510112804.2401150-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index 53838e7..6db5cb1 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);