stm32_i2c: fixed timeout handling

thanks to hxxnrx@gmail.com for noticing this
stm32_i2c: ensure we don't change priv-> after semaphore is released

this prevents a race condition where a subsequent I2C transfer could
be lost

Many thanks to hxxnrx@gmail.com for reporting this bug