nfctype4: Only call callback once when writing

To perform a write operation, nfctype4_write()
calls data_write() which starts the write operation
and it is continued by data_write_cb() until the
operation is complete.  Once the write operation
is complete, data_write_cb() calls the callback
routine.

Unfortunately, nfctype4_write() also calls the
callback routine unconditionally when data_write()
returns.  This results in the callback being called
twice for successful write operations.

Instead, make nfctype4_write() return immediately
after calling data_write() because data_write_cb()
calls the callback when writes are successful and
data_write() already calls the callback and does
the clean up when there is an error.
1 file changed