Skip to contentSkip to conversation

media: staging: atomisp: remove redundant OOM error messages

PATCH In review Zixuan Dong 2 participants 2 messages Dec 15, 2025 – Dec 28, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: staging: atomisp: remove redundant OOM error messages

The memory allocation functions (kvzalloc) already emit a stack dump on failure when GFP_KERNEL is used. Printing an extra error message is redundant and increases code size.

This resolves the checkpatch warnings:
WARNING: Possible unnecessary 'out of memory' message

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -4
index 3a4eb4f6d3be..a3cd9d3e9ce7 100644
@@ -2961,11 +2961,8 @@ int atomisp_set_parameters(struct video_device *vdev,
 		 * per-frame setting only works for the main output frame.
 		 */
 		param = kvzalloc(sizeof(*param), GFP_KERNEL);
-		if (!param) {
-			dev_err(asd->isp->dev, "%s: failed to alloc params buffer\n",
-				__func__);
+		if (!param)
 			return -ENOMEM;
-		}
 		css_param = &param->params;
 	}
 
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Zixuan Dong

The memory allocation functions (kvzalloc) already emit a stack dump on failure when GFP_KERNEL is used. Printing an extra error message is redundant and increases code size.

This resolves the checkpatch warnings:
WARNING: Possible unnecessary 'out of memory' message

Sakari, can you pick this up?

Signature · 2 lines
With Best Regards,
Andy Shevchenko