[PATCH] gigaset: gigaset_isowbuf_getbytes() may return signed unnoticed

From: Roel Kluin
Date: Wed Apr 23 2008 - 17:27:40 EST


ifd->offset is unsigned. gigaset_isowbuf_getbytes() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@xxxxxxxxxx>
---
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 5255b5e..c97479b 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -1050,9 +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) {
+ rc = gigaset_isowbuf_getbytes(ubc->isooutbuf, ifd->length);
+ ifd->offset = rc;
+ if (rc < 0) {
if (ifd->offset == -EBUSY) {
gig_dbg(DEBUG_ISO,
"%s: buffer busy at frame %d",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/