Skip to content
Commit e13f64ac authored by Gaetan Perrot's avatar Gaetan Perrot Committed by Dan Kalowsky
Browse files

drivers: sensor: bmm350: fix redundant return logic in init_chip



Add an explicit log message if setting suspend mode fails during error
handling in bmm350_init_chip(), to improve debuggability.

This addresses Coverity issue CID 520279 (Incorrect expression - CWE-398),
which flagged a conditional block where both branches effectively led to
the same outcome (return -EIO), making it appear redundant.

By adding a log before returning, we clarify the purpose of the condition
and avoid the issue of "identical code for different branches", while
keeping the functional behavior unchanged.

Coverity-CID: 520279

Signed-off-by: default avatarGaetan Perrot <gaetan.perrot@spacecubics.com>
parent 935da29a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment