samples: sensor: Fix logically dead code in adxl372 sample

Converts the adxl372 sample application to check the sensor device at
build time instead of runtime. This fixes a Coverity issue for logically
dead code introduced in commit 72795c3e6c2949961d0bf78bcfe94ca75f399d44.

Fixes #35119
Coverity-CID: 235932

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
1 file changed