ifd->offset is unsigned. gigaset_isowbuf_getbytes() may return signed unnoticed.
Revised version of patch originally submitted by Roel Kluin <12o3l@tiscali.nl>.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/gigaset/bas-gigaset.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 5255b5e..3f11910 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -1050,10 +1050,9 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
}
/* retrieve block of data to send */
- ifd->offset = gigaset_isowbuf_getbytes(ubc->isooutbuf,
- ifd->length);
- if (ifd->offset < 0) {
- if (ifd->offset == -EBUSY) {
+ rc = gigaset_isowbuf_getbytes(ubc->isooutbuf, ifd->length);
+ if (rc < 0) {
+ if (rc == -EBUSY) {
gig_dbg(DEBUG_ISO,
"%s: buffer busy at frame %d",
__func__, nframe);
@@ -1062,11 +1061,12 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
} else {
dev_err(ucx->bcs->cs->dev,
"%s: buffer error %d at frame %d\n",
- __func__, ifd->offset, nframe);
- return ifd->offset;
+ __func__, rc, nframe);
+ return rc;
}
break;
}
+ ifd->offset = rc;
ucx->limit = ubc->isooutbuf->nextread;
ifd->status = 0;
ifd->actual_length = 0;
--
1.5.4.7.gd8534-dirty
--
| Arjan van de Ven | [patch] Add basic sanity checks to the syscall execution patch |
| Rafael J. Wysocki | Re: Linux 2.6.25-rc2 |
| Andrew Morton | Re: 2.6.23-rc4-mm1 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Linus Torvalds | Re: On Tabs and Spaces |
| Lars Hjemli | Re: kernel.org mirroring (Re: [GIT PULL] MMC update) |
| Eric Wong | Re: [RFC] Git config file reader in Perl (WIP) |
| Jakub Narebski | Re: GSoC 2008 - Mentors Wanted! |
| Karel Kulhavy | OpenBSD sticker considered cool by a layman |
| Richard Stallman | Real men don't attack straw men |
| Marco Peereboom | Re: Multi-Threaded SSH/SCP made by university of Puttsburgh |
| Douglas A. Tutty | lock(1) to lock all virtual terminals? |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Brandon S. Allbery | Re: mkdir says "no space left on device" and more problems... |
| Arthur Recktenwald | rcmd: socket: Permission denied |
| massimo rossi | Re: SLS on Compaq Deskpro 66M (486-66/DX2 EISA [ugh])? |
