Correct handling result of btree_insert() call

- 'r != BTREE_RESULT_SUCCESS' does not mean failure because it returns
'BTREE_RESULT_UPDATE' when existing key is successfully updated as a
result of btree_insert() call.

Change-Id: I152d3546ea7a4d6d50df2e126f15dfd2b5f4dca0