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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <hjlipp@...>, <tilman@...>
Cc: <gigaset307x-common@...>, lkml <linux-kernel@...>
Date: Wednesday, April 23, 2008 - 5:27 pm

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

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
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",
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] gigaset: gigaset_isowbuf_getbytes() may return signe..., Roel Kluin, (Wed Apr 23, 5:27 pm)