.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices |
---|
3 | 4 | |
---|
.. | .. |
---|
5 | 6 | Based on em28xx driver |
---|
6 | 7 | Based on Cx23885 driver |
---|
7 | 8 | |
---|
8 | | - This program is free software; you can redistribute it and/or modify |
---|
9 | | - it under the terms of the GNU General Public License as published by |
---|
10 | | - the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - (at your option) any later version. |
---|
12 | | - |
---|
13 | | - This program is distributed in the hope that it will be useful, |
---|
14 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - GNU General Public License for more details. |
---|
17 | | - |
---|
18 | | - You should have received a copy of the GNU General Public License |
---|
19 | | - along with this program; if not, write to the Free Software |
---|
20 | | - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
21 | 9 | */ |
---|
22 | 10 | |
---|
23 | 11 | #include "cx231xx.h" |
---|
.. | .. |
---|
527 | 515 | { |
---|
528 | 516 | struct cx231xx *dev = bus->dev; |
---|
529 | 517 | |
---|
530 | | - BUG_ON(!dev->cx231xx_send_usb_command); |
---|
| 518 | + if (!dev->cx231xx_send_usb_command) |
---|
| 519 | + return -EINVAL; |
---|
531 | 520 | |
---|
532 | 521 | bus->i2c_adap = cx231xx_adap_template; |
---|
533 | 522 | bus->i2c_adap.dev.parent = dev->dev; |
---|