media: stk1160: Restore deleted comment in stk1160_fill_urb()

This comment explains why we return success when usb_alloc_noncoherent()
fails and I think it's helpful.  It was deleted during a recent refactor,
but let's add it back.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Xu Yang <xu.yang_2@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Dan Carpenter
2025-08-29 11:04:02 +02:00
committed by Hans Verkuil
parent 419f151de0
commit 6704c672fd
+6 -1
View File
@@ -408,8 +408,13 @@ static int stk1160_fill_urb(struct stk1160 *dev, struct stk1160_urb *stk_urb,
stk_urb->transfer_buffer = usb_alloc_noncoherent(dev->udev, sb_size,
GFP_KERNEL, &stk_urb->dma,
DMA_FROM_DEVICE, &stk_urb->sgt);
if (!stk_urb->transfer_buffer)
if (!stk_urb->transfer_buffer) {
/*
* If the buffer allocation failed, we exit but return 0 since
* we allow the driver working with less buffers.
*/
goto free_urb;
}
stk_urb->dev = dev;
return 0;