zephyr: test: bma2x2: Fix test_bma_set_offset
zephyr: test: bma2x2: Fix test_bma_set_offset

The BMA2x2 set_offset function does some calculations on offset, so
offset argument has to be valid. Some unexpected values may trigger
floating point exception. To prevent that, exp_offset value is
initialized.
Rotation may be used in calculations, too. To prevent using rotation
value that is out of scope, rotation is set to NULL after each test.

BUG=None
TEST=./twister -T zephyr/test/drivers
BRANCH=None

Signed-off-by: Tomasz Michalec <a547db31280d14f095c760a23a7523d0b1e55fe6@semihalf.com>
Change-Id: I22b7d2855133c1ce0e8cb4ae095b000337249b96
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3827192
Tested-by: Tomasz Michalec <c064a6042954d4ba0805003dc021b76413ff1548@google.com>
Commit-Queue: Tomasz Michalec <c064a6042954d4ba0805003dc021b76413ff1548@google.com>
Reviewed-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
Code-Coverage: Zoss <345cf107e82c70959d46f59d98bddc98ce458aff@prod.google.com>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec