summaryrefslogtreecommitdiff
path: root/camlibs/clicksmart310/clicksmart.c
diff options
context:
space:
mode:
Diffstat (limited to 'camlibs/clicksmart310/clicksmart.c')
-rw-r--r--camlibs/clicksmart310/clicksmart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/camlibs/clicksmart310/clicksmart.c b/camlibs/clicksmart310/clicksmart.c
index f5586f930..7ee867dcb 100644
--- a/camlibs/clicksmart310/clicksmart.c
+++ b/camlibs/clicksmart310/clicksmart.c
@@ -86,9 +86,9 @@ int clicksmart_init (GPPort *port, CameraPrivateLibrary *priv)
CLICKSMART_READ_STATUS (port, &c);
gp_port_usb_msg_interface_write(port, 6, 0, 9, NULL, 0);
while (c != 1) {
- if (GP_OK > CLICKSMART_READ_STATUS (port, &c)) {
- return GP_ERROR_IO;
- }
+ int r;
+ if ((r = CLICKSMART_READ_STATUS (port, &c)) < GP_OK)
+ return r;
}
buffer = malloc(0x200);
if (!buffer) {