firewire: unchecked return of acquire_sem_etc, coding style

This commit is contained in:
Philippe Saint-Pierre
2011-12-31 16:41:01 -05:00
parent 9aec8e8424
commit 848762a7d4
@@ -272,8 +272,7 @@ fw_free(void *cookie)
}
/* free extbuf */
fwdev_freebuf(it);
it->flag &= ~(FWXFERQ_OPEN |
FWXFERQ_MODEMASK | FWXFERQ_CHTAGMASK);
it->flag &= ~(FWXFERQ_OPEN | FWXFERQ_MODEMASK | FWXFERQ_CHTAGMASK);
d->it = NULL;
}
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) {
//err = msleep(&d->rq, FW_GMTX(d->fc), FWPRI, "fwra", 0);
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);
}
@@ -448,7 +448,8 @@ readloop:
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_pkt pkt;
@@ -578,7 +579,7 @@ isoloop:
#endif
// err = msleep(it, FW_GMTX(fc), FWPRI, "fw_write", hz);
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);
// if (err)