-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Open
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: AudiobugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: ADIAnalog Devices, Inc.Analog Devices, Inc.priority: mediumMedium impact/importance bugMedium impact/importance bug
Description
Static code scan issues found in file:
Category: Error handling issues
Function: max98091_read_reg
Component: Drivers
CID: 529876
Details:
zephyr/drivers/audio/max98091.c
Line 35 in 4bd1d39
i2c_reg_read_byte_dt(&dev_cfg->i2c, reg, val); |
29 }
30
31 static void max98091_read_reg(const struct device *dev, uint8_t reg, uint8_t *val)
32 {
33 const struct max98091_config *const dev_cfg = dev->config;
34
>>> CID 529876: Error handling issues (CHECKED_RETURN)
>>> Calling "i2c_reg_read_byte_dt" without checking return value (as is done elsewhere 265 out of 285 times).
35 i2c_reg_read_byte_dt(&dev_cfg->i2c, reg, val);
36 }
37
38 static void max98091_update_reg(const struct device *dev, uint8_t reg, uint8_t mask, uint8_t val)
39 {
40 const struct max98091_config *const dev_cfg = dev->config;
For more information about the violation, check the Coverity Reference. (CWE-252)
Please fix or provide comments in coverity using the link:
https://scan9.scan.coverity.com/#/project-view/29271/12996?selectedIssue=529876
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the MAINTAINERS file.
Also see the related Coverity documentation for more information.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: AudiobugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugplatform: ADIAnalog Devices, Inc.Analog Devices, Inc.priority: mediumMedium impact/importance bugMedium impact/importance bug