If virtqueue_prepare() fails, virtqueue_kick() falls back to returning true:
/**
* virtqueue_kick - update after add_buf
* @vq: the struct virtqueue
*
* After one or more virtqueue_add_* calls, invoke this to kick
* the other side.
*
* Caller must ensure we don't call this with other virtqueue
* operations at the same time (except where noted).
*
* Returns false if kick failed, otherwise true.
*/
bool virtqueue_kick(struct virtqueue *vq)
{
if (virtqueue_kick_prepare(vq))
return virtqueue_notify(vq);
return true;
}
>From the comment (and the return values of virtqueue_notify()), I
would've expected that last line to return false.
It probably doesn't matter much; I could only find a few files that care
about the return value, and I assume failures from prepare are *very* rare.
//Snild