[PATCH 2/3] media: vimc: sensor: register subdevice only after initialization

2019-10-01 Thread Dafna Hirschfeld
vimc_sen_add function first registers the subdevice and then calls tpg_alloc. If tpg_alloc fails it unregisters the subdevice and then frees vsen, this cause double free since the release callback that follows subdevice unregistration also frees vsen. Signed-off-by: Dafna Hirschfeld --- drivers/

Re: [PATCH 2/3] media: vimc: sensor: register subdevice only after initialization

2019-10-01 Thread Helen Koike
On 10/1/19 1:50 PM, Dafna Hirschfeld wrote: > vimc_sen_add function first registers the subdevice and then > calls tpg_alloc. If tpg_alloc fails it unregisters the subdevice > and then frees vsen, this cause double free since the release > callback that follows subdevice unregistration also free