rem: if (pPacket == 0)
add: if (pPacket == 0) { *numBytes = -1;
context: status_t b57_read(void *cookie,off_t pos,void *data,size_t *numBytes) {	struct be_b57_dev *pUmDevice = (struct be_b57_dev *)cookie;	PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice;	PLM_PACKET pPacket;	struct B_UM_PACKET *pUmPacket;	cpu_status cpu;		if (pUmDevice->block)		acquire_sem(pUmDevice->packet_release_sem);	else		acquire_sem_etc(pUmDevice->packet_release_sem,1,B_RELATIVE_TIMEOUT,0); // Decrement the receive sem anyway, but don't block		cpu = disable_interrupts();	acquire_spinlock(&pUmDevice->lock);		pPacket = (PLM_PACKET)		QQ_PopHead(&pUmDevice->RxPacketReadQ.Container);			release_spinlock(&pUmDevice->lock);	enable_interrupts(cpu);		if (pPacket == 0)		return B_ERROR;			pUmPacket = (struct B_UM_PACKET *) pPacket;	if ((pPacket->PacketStatus != LM_STATUS_SUCCESS) ||		((pPacket->PacketSize) > 1518)) {				cpu = disable_interrupts();		acquire_spinlock(&pUmDevice->lock);				QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket);		release_spinlock(&pUmDevice->lock);		enable_interrupts(cpu);		*numBytes = -1;		return B_ERROR;	}		if ((pPacket->PacketSize) < *numBytes)		*numBytes = pPacket->PacketSize;		memcpy(data,pUmPacket->data,*numBytes);	cpu = disable_interrupts();	acquire_spinlock(&pUmDevice->lock);		QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket);		release_spinlock(&pUmDevice->lock);	enable_interrupts(cpu);		return B_OK;}