| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2005-2006 Micronas USA Inc. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License (Version 2) as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | | - * GNU General Public License for more details. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 172 | 164 | ++i; |
|---|
| 173 | 165 | } else if (msgs[i].len == 3) { |
|---|
| 174 | 166 | if (msgs[i].flags & I2C_M_RD) |
|---|
| 175 | | - return -EIO; |
|---|
| 176 | | - if (msgs[i].len != 3) |
|---|
| 177 | 167 | return -EIO; |
|---|
| 178 | 168 | if (go7007_i2c_xfer(go, msgs[i].addr, 0, |
|---|
| 179 | 169 | (msgs[i].buf[0] << 8) | msgs[i].buf[1], |
|---|