Home
last modified time | relevance | path

Searched hist:"340 b4dd6" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/staging/media/atomisp/i2c/
H A Datomisp-gc0310.c340b4dd6 Sun Feb 05 15:53:25 CST 2023 Hans de Goede <hdegoede@redhat.com> media: atomisp: gc0310: Use devm_kzalloc() for data struct

Use devm_kzalloc() to allocate the data struct. It is always free-ed as
the last step of probe-error-exit or remove, so it can be devm-managed.

This will make unwinding things easier when support is added to the gc0310
code to use standard GPIO APIs instead of the custom atomisp_gmin code.

This also allows dropping the out_free label and use direct return
on errors.

This may seem like a functional change since the out_free label also
did a v4l2_device_unregister_subdev() but at the 1 changed return
the device is not registered yet, so that always is a no-op and can
be dropped.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>