mirror of https://github.com/torvalds/linux.git
When device_register() fails, ulpi_register() calls put_device() on
ulpi->dev.
The device release callback ulpi_dev_release() drops the OF node
reference and frees ulpi, but the current error path in
ulpi_register_interface() then calls kfree(ulpi) again, causing a
double free.
Let put_device() handle the cleanup through ulpi_dev_release() and
avoid freeing ulpi again in ulpi_register_interface().
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| common.c | ||
| common.h | ||
| debug.c | ||
| led.c | ||
| ulpi.c | ||
| usb-conn-gpio.c | ||
| usb-otg-fsm.c | ||