accelerometer: remove dead if and modernize

Based on a coverity warning.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>