Fix retun ignoring on write call

Signed-off-by: Xavier Roche <xavrock.os@gmail.com>