diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-08 12:32:49 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-10-08 12:32:49 +0200 |
commit | cfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (patch) | |
tree | 56cb8849a5df91b19b72fd4f48c79c343cd9bc5e /backend/rts8891.c | |
parent | ba8d09abe681600aad991f4a75e904615b7ed29f (diff) |
Imported Upstream version 1.0.25upstream/1.0.25
Diffstat (limited to 'backend/rts8891.c')
-rw-r--r-- | backend/rts8891.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/backend/rts8891.c b/backend/rts8891.c index d86347b..bdb4011 100644 --- a/backend/rts8891.c +++ b/backend/rts8891.c @@ -2212,7 +2212,13 @@ sane_close (SANE_Handle handle) /* switch off lamp and close usb */ if (dev->conf.allowsharing == SANE_TRUE) { - sanei_usb_claim_interface (dev->devnum, 0); + SANE_Status status = sanei_usb_claim_interface (dev->devnum, 0); + if (status != SANE_STATUS_GOOD) + { + DBG (DBG_warn, "sane_close: cannot claim usb interface: %s\n", + sane_strstatus(status)); + DBG (DBG_warn, "sane_close: continuing anyway\n"); + } } set_lamp_state (session, 0); sanei_usb_close (dev->devnum); @@ -3197,14 +3203,6 @@ find_origin (struct Rts8891_Device *dev, SANE_Bool * changed) return status; } - if (status != SANE_STATUS_GOOD) - { - free(image); - free(data); - DBG (DBG_error, "find_origin: failed to wait for data\n"); - return status; - } - if (DBG_LEVEL > DBG_io2) { write_gray_data (data, "find_origin.pnm", width, height); |