firewire: unchecked return of acquire_sem_etc, coding style
This commit is contained in:
@@ -272,8 +272,7 @@ fw_free(void *cookie)
|
|||||||
}
|
}
|
||||||
/* free extbuf */
|
/* free extbuf */
|
||||||
fwdev_freebuf(it);
|
fwdev_freebuf(it);
|
||||||
it->flag &= ~(FWXFERQ_OPEN |
|
it->flag &= ~(FWXFERQ_OPEN | FWXFERQ_MODEMASK | FWXFERQ_CHTAGMASK);
|
||||||
FWXFERQ_MODEMASK | FWXFERQ_CHTAGMASK);
|
|
||||||
d->it = NULL;
|
d->it = NULL;
|
||||||
}
|
}
|
||||||
free(d);
|
free(d);
|
||||||
@@ -300,7 +299,8 @@ fw_read_async(struct fw_drv1 *d, off_t position, void *buf, size_t *num_bytes)
|
|||||||
while ((xfer = STAILQ_FIRST(&d->rq)) == NULL && err == B_OK) {
|
while ((xfer = STAILQ_FIRST(&d->rq)) == NULL && err == B_OK) {
|
||||||
//err = msleep(&d->rq, FW_GMTX(d->fc), FWPRI, "fwra", 0);
|
//err = msleep(&d->rq, FW_GMTX(d->fc), FWPRI, "fwra", 0);
|
||||||
FW_GUNLOCK(d->fc);
|
FW_GUNLOCK(d->fc);
|
||||||
err = acquire_sem_etc(d->rqSem, 1, B_CAN_INTERRUPT | B_TIMEOUT, B_INFINITE_TIMEOUT);//B_INFINITE_TIMEOUT means no timeout?
|
err = acquire_sem_etc(d->rqSem, 1, B_CAN_INTERRUPT | B_TIMEOUT,
|
||||||
|
B_INFINITE_TIMEOUT);//B_INFINITE_TIMEOUT means no timeout?
|
||||||
FW_GLOCK(d->fc);
|
FW_GLOCK(d->fc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +448,8 @@ readloop:
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fw_write_async(struct fw_drv1 *d, off_t position, const void *buf, size_t *num_bytes)
|
fw_write_async(struct fw_drv1 *d, off_t position, const void *buf,
|
||||||
|
size_t *num_bytes)
|
||||||
{
|
{
|
||||||
struct fw_xfer *xfer;
|
struct fw_xfer *xfer;
|
||||||
struct fw_pkt pkt;
|
struct fw_pkt pkt;
|
||||||
@@ -578,7 +579,7 @@ isoloop:
|
|||||||
#endif
|
#endif
|
||||||
// err = msleep(it, FW_GMTX(fc), FWPRI, "fw_write", hz);
|
// err = msleep(it, FW_GMTX(fc), FWPRI, "fw_write", hz);
|
||||||
FW_GUNLOCK(fc);
|
FW_GUNLOCK(fc);
|
||||||
acquire_sem_etc(it->Sem, 1, B_CAN_INTERRUPT | B_TIMEOUT, 1000000);
|
err = acquire_sem_etc(it->Sem, 1, B_CAN_INTERRUPT | B_TIMEOUT, 1000000);
|
||||||
FW_GLOCK(fc);
|
FW_GLOCK(fc);
|
||||||
|
|
||||||
// if (err)
|
// if (err)
|
||||||
|
|||||||
Reference in New Issue
Block a user