Re: [PATCH 1/4] iio:accel: call devm_iio_device_free function if common_proble fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> When the device is allocated with devm_iio_device... you do not need to manually free the device. If probe fails the device will be freed automatically.
>>
>> - Lars
> Indeed - the handling in these drivers appears entirely correct.
> The allocs are done with devm so under any error conditions or
> deliberate removal they will be cleared up.
>
> The register should not be done using devm as that would mean the
> unregister would occur late.  As the register is done last, there
> are no error conditions that can require it being removed in the
> probe function.  Hence the code looks fine to me as it stands.
>
> So Denis, do you have an observed problem that prompted these patches?
>
Ok thanks for your answers.

it seemed to me the device would not be released but maybe it's my problem.

Thanks,
Denis--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux