From: Alexey Khoroshilov Date: Sat, 5 Sep 2015 22:11:51 +0000 (+0300) Subject: usb: gadget: amd5536udc: fix error handling in udc_pci_probe() X-Git-Tag: omap-for-v4.3/fixes-rc5~79^2~14^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6527cc27761a124de8c08e6488ce17fdcc74dbba;p=pandora-kernel.git usb: gadget: amd5536udc: fix error handling in udc_pci_probe() If a failure happens early in udc_pci_probe(), error handling code just kfree(dev) and returns. The patch adds proper resource deallocations in udc_pci_probe() itself, since udc_pci_remove() is not suitabe to be called so early in initialization process. By the way, iounmap(dev->regs) is replaced by iounmap(dev->virt_addr) in udc_pci_remove() for clarity. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed