From: Zixuan Dong Date: Mon, 15 Dec 2025 05:53:32 +0000 (+0800) Subject: media: staging: atomisp: remove redundant OOM error messages X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acc483fad79ecd1f5fb0adfd605f276383b678cd;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Zixuan Dong Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 3a4eb4f6d3be5..a3cd9d3e9ce74 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -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 = ¶m->params; }