summaryrefslogtreecommitdiff
path: root/backend/rts8891.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-01-02 20:06:30 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-01-02 20:06:30 +0100
commitb2802d98d4486d6afc585062f4ca02fddf829dc5 (patch)
treeb74907ddd07161872edfa3d8be1a4ece63a6ec62 /backend/rts8891.c
parent29eaee2cf7c71df75a2d31f82738cc3a060f7a88 (diff)
Release 1.0.25+git20150102-1
Diffstat (limited to 'backend/rts8891.c')
-rw-r--r--backend/rts8891.c16
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);