drivers: fix 'var' may be uninitialized in this function