Skip to content
Commit dc659499 authored by Ryan McClelland's avatar Ryan McClelland Committed by Daniel DeGrasse
Browse files

drivers: sensor: bmm350: nit picky cleanup



There were a lot of places where the return value was sum'ed up
which can be slightly easier to read, but can give an odd return
value in the end. This changes it to just return immediately if
an error is seen.

There was also runtime NULL checking of input arguments that are
rather programmer clown prevention. Change these to asserts.

The return value didn't have a consistant type through the file,
make it consistently an int.

This changes the name of the return value of fix_sign to be
signed_value differenating it from the ret name used elsewhere.

Use the sizeof(buffer) as the argument for reg reads and writes
rather than a hard number.

Some log messages ended with '\n'. Remove all these.

Signed-off-by: default avatarRyan McClelland <ryanmcclelland@meta.com>
parent e636fb2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment