Home
last modified time | relevance | path

Searched hist:cdeb2ba99cb333f7729cd5784ea2de00e265f22f (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/core/
H A Ddevice.ccdeb2ba99cb333f7729cd5784ea2de00e265f22f Mon Aug 24 08:14:02 UTC 2015 Bin Meng <bmeng.cn@gmail.com> dm: core: Fix code reentrancy issue in device_probe_child()

The device might have already been probed during the call to
device_probe() on its parent device (e.g. PCI bridge devices).
In its parent device's probe routine, it might probe all of
its child devices via device_probe() thus the codes reenter
device_probe_child(). To support code reentrancy, test these
allocated memory against NULL to avoid memory leak, and return
to the caller if dev->flags has DM_FLAG_ACTIVATED set after
device_probe() returns, so that we don't mess up the device.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>