Skip to contentSkip to conversation

media: platform: Fix missing error code in rzg2l_cru_start_streaming_vq()

PATCH Superseded Jiapeng Chong 2 participants 2 messages Nov 29, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: platform: Fix missing error code in rzg2l_cru_start_streaming_vq()

Failed to allocate scratch buffer, add the error code '-ENOMEM' to the return value 'ret'.

drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:676 rzg2l_cru_start_streaming_vq() warn: missing error code 'ret'.

---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +1 -0
index 9533e4069ecd..91b57c7c2e56 100644
@@ -673,6 +673,7 @@ static int rzg2l_cru_start_streaming_vq(struct vb2_queue *vq, unsigned int count
 	if (!cru->scratch) {
 		return_unused_buffers(cru, VB2_BUF_STATE_QUEUED);
 		dev_err(cru->dev, "Failed to allocate scratch buffer\n");
+		ret = -ENOMEM;
 		goto free_image_conv_irq;
 	}
 
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

Hi Jiapeng Chong,

Please repost with a proper subject line prefix: "media: rzg2l-cru:".

The 'media: platform:' prefix suggests a media/platform-wide patch, not a patch for a single driver.

Why is this so hard to do?

Regards,

Hans

Quoted 24 lines · Jiapeng Chong

Failed to allocate scratch buffer, add the error code '-ENOMEM' to the return value 'ret'.

drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:676 rzg2l_cru_start_streaming_vq() warn: missing error code 'ret'.

---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +1 -0
index 9533e4069ecd..91b57c7c2e56 100644
@@ -673,6 +673,7 @@ static int rzg2l_cru_start_streaming_vq(struct vb2_queue *vq, unsigned int count
 	if (!cru->scratch) {
 		return_unused_buffers(cru, VB2_BUF_STATE_QUEUED);
 		dev_err(cru->dev, "Failed to allocate scratch buffer\n");
+		ret = -ENOMEM;
 		goto free_image_conv_irq;
 	}