sf: Fix NULL pointer exception for flashes without lock methods