Bug 93291 - Potentially incorrect interrupt management in bmg160.c
Summary: Potentially incorrect interrupt management in bmg160.c
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-15 20:25 UTC by Leonid Ryzhyk
Modified: 2015-02-15 20:25 UTC (History)
0 users

See Also:
Kernel Version: 3.19
Subsystem:
Regression: No
Bisected commit-id:


Attachments
a copy of the driver for the latest kernel checkout (29.43 KB, text/x-csrc)
2015-02-15 20:25 UTC, Leonid Ryzhyk
Details

Description Leonid Ryzhyk 2015-02-15 20:25:27 UTC
Created attachment 166961 [details]
a copy of the driver for the latest kernel checkout

The bmg160_setup_any_motion_interrupt() function seems to contain copy-pasted code that enables/disables the data interrupt, which this function is not supposed to touch.  Specifically, after correctly enabling the any motion interrupt, it enables, in line 346, the data interrupt.  Likewise, in line 351 it disables the data interrupt instead of the any motion interrupt.

Disclaimer: This defect was found via code inspection.  I have not tried to reproduce the bug and in fact I don't own the bmg160 gyro hardware that this driver is for.

Note You need to log in before you can comment on or make changes to this bug.