.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * cpia CPiA (1) gspca driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * (C) Copyright 1999-2000 Scott J. Bertin |
---|
10 | 11 | * (C) Copyright 1999-2000 Johannes Erdfelt <johannes@erdfelt.com> |
---|
11 | 12 | * (C) Copyright 2000 STMicroelectronics |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify |
---|
14 | | - * it under the terms of the GNU General Public License as published by |
---|
15 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
16 | | - * (at your option) any later version. |
---|
17 | | - * |
---|
18 | | - * This program is distributed in the hope that it will be useful, |
---|
19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
21 | | - * GNU General Public License for more details. |
---|
22 | | - * |
---|
23 | 13 | */ |
---|
24 | 14 | |
---|
25 | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
547 | 537 | } |
---|
548 | 538 | if (sd->params.qx3.button) { |
---|
549 | 539 | /* button pressed - unlock the latch */ |
---|
550 | | - do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, |
---|
| 540 | + ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, |
---|
551 | 541 | 3, 0xdf, 0xdf, 0); |
---|
552 | | - do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, |
---|
| 542 | + if (ret) |
---|
| 543 | + return ret; |
---|
| 544 | + ret = do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, |
---|
553 | 545 | 3, 0xff, 0xff, 0); |
---|
| 546 | + if (ret) |
---|
| 547 | + return ret; |
---|
554 | 548 | } |
---|
555 | 549 | |
---|
556 | 550 | /* test whether microscope is cradled */ |
---|