Searched hist:fb50aacdcf124d98ed93d4cc87867aa60011b52d (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/usb/dwc2/ |
H A D | pci.c | diff fb50aacdcf124d98ed93d4cc87867aa60011b52d Fri Jan 19 04:46:04 CST 2018 Vardan Mikayelyan <mvardan@synopsys.com> usb: dwc2: pci: Move devm_kzalloc() before platform_device_add()
After platform_device_add(), if we error out, we must do platform_device_unregister(), which also does the put. So lets move devm_kzalloc() to simplify error handling and avoid calling of platform_device_unregister().
Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|