We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d098904 commit f655a96Copy full SHA for f655a96
drivers/iio/pressure/mpl3115.c
@@ -160,7 +160,7 @@ static irqreturn_t mpl3115_trigger_handler(int irq, void *p)
160
* of the buffer may be either 16 or 32-bits. As such we cannot
161
* use a simple structure definition to express this data layout.
162
*/
163
- u8 buffer[16] __aligned(8);
+ u8 buffer[16] __aligned(8) = { };
164
int ret, pos = 0;
165
166
mutex_lock(&data->lock);
@@ -170,7 +170,6 @@ static irqreturn_t mpl3115_trigger_handler(int irq, void *p)
170
goto done;
171
}
172
173
- memset(buffer, 0, sizeof(buffer));
174
if (test_bit(0, indio_dev->active_scan_mask)) {
175
ret = i2c_smbus_read_i2c_block_data(data->client,
176
MPL3115_OUT_PRESS, 3, &buffer[pos]);
0 commit comments