mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>. Signed-off-by: Tilman Schmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5002779d37
commit
5f09c4c797
1 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue