| .. | .. |
|---|
| 296 | 296 | |
|---|
| 297 | 297 | ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_CONFIG, |
|---|
| 298 | 298 | reg, NULL, 0, (u8 *)&v, 2); |
|---|
| 299 | + if (ret < 0) |
|---|
| 300 | + return ret; |
|---|
| 301 | + |
|---|
| 299 | 302 | *val = be16_to_cpu(v); |
|---|
| 300 | 303 | |
|---|
| 301 | | - return ret; |
|---|
| 304 | + return 0; |
|---|
| 302 | 305 | } |
|---|
| 303 | 306 | EXPORT_SYMBOL(mma9551_read_config_word); |
|---|
| 304 | 307 | |
|---|
| .. | .. |
|---|
| 354 | 357 | |
|---|
| 355 | 358 | ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_STATUS, |
|---|
| 356 | 359 | reg, NULL, 0, (u8 *)&v, 2); |
|---|
| 360 | + if (ret < 0) |
|---|
| 361 | + return ret; |
|---|
| 362 | + |
|---|
| 357 | 363 | *val = be16_to_cpu(v); |
|---|
| 358 | 364 | |
|---|
| 359 | | - return ret; |
|---|
| 365 | + return 0; |
|---|
| 360 | 366 | } |
|---|
| 361 | 367 | EXPORT_SYMBOL(mma9551_read_status_word); |
|---|
| 362 | 368 | |
|---|