The non standard decoding functions are registered in app init process
through __attribute__((constructor)), and unregistered in app exit process
through __attribute__((destructor)). We don't need to unregister them
in any other steps. This patch removes these unnecessary unregister calls.
Fixes: 78a21c1e9770 ("rasdaemon: add closure and cleanups for the database")
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
"Old kernel detected. Stop listening and fall back to pthread way.\n");
cleanup:
- if (pdata[0].ras->record_events) {
- unregister_ns_dec_tab();
+ if (pdata[0].ras->record_events)
ras_mc_event_closedb(pdata[0].cpu, pdata[0].ras);
- }
error:
kbuffer_free(kbuf);
read_ras_event(fd, pdata, kbuf, page);
- if (pdata->ras->record_events) {
- unregister_ns_dec_tab();
+ if (pdata->ras->record_events)
ras_mc_event_closedb(pdata->cpu, pdata->ras);
- }
close(fd);
kbuffer_free(kbuf);