On 03.02.2016 19:45, Krzysztof Kozlowski wrote:
On 03.02.2016 18:30, Laxman Dewangan wrote:
err_rtc:You should clean up in reverse order of allocation, so first
+ if (info->rtc)
+ i2c_unregister_device(info->rtc);
+ regmap_del_irq_chip(info->rtc_irq, info->rtc_irq_data);
+
regmap_del_irq_chip then i2c_unregister_device. This
is a common pattern of cleaning up. Sometimes such order
is even necessary because of dependencies between
components... which is not a case here but still the
natural way is reversing the allocation code.
[ 88.296055] [<c00eaa6c>] (do_filp_open) from [<c00dc29c>] (do_sys_open+0x114/0x1c0)However removal of "remove" callback helps... which could be expected...
[ 88.303699] [<c00dc29c>] (do_sys_open) from [<c000f8c0>] (ret_fast_syscall+0x0/0x3c)
[ 88.311419] Code: e7905003 e3550000 0a00001f e5943014 (e7950003)
[ 88.317573] ---[ end trace 9502799e3ea05a80 ]---
maybe it is not an error of the driver itself?