diff options
author | Tilman Schmidt | 2008-07-23 21:28:27 -0700 |
---|---|---|
committer | Linus Torvalds | 2008-07-24 10:47:22 -0700 |
commit | 5f09c4c797d00bef5700e1ca085b4efcedaf34b8 (patch) | |
tree | 126772d4fb24001bf57590f7532be7557086cc4c /drivers/isdn | |
parent | 5002779d37b261271da9883e06c14b097d4781c4 (diff) |
gigaset: gigaset_isowbuf_getbytes() may return signed unnoticed
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | 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 5255b5e20e13..3f11910c7ccd 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; |