[9.18] Eliminate the dead code in dst_api.c
In write_public_key() and write_key_state(), there were left-over checks for result, that were effectively dead code after the last refactoring. Remove those.
(cherry picked from commit 766366e9)
Closes #3990 (closed)
Backport of MR !7773 (merged)
Edited by Michał Kępień