platform/x86: wmi: Remove unnecessary out-of-memory message
authorArmin Wolf <W_Armin@gmx.de>
Tue, 6 Feb 2024 22:04:46 +0000 (23:04 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 7 Feb 2024 13:51:11 +0000 (15:51 +0200)
If kzalloc() fails, an out-of-memory message is already
printed. Remove the unnecessary second warning message.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240206220447.3102-3-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/wmi.c

index 43d750ff65cf010951e72b910df7fe0c07058548..be3e35a907038d19a9e01a310a8146ed46c49ef0 100644 (file)
@@ -1093,10 +1093,8 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
                        continue;
 
                wblock = kzalloc(sizeof(*wblock), GFP_KERNEL);
-               if (!wblock) {
-                       dev_err(wmi_bus_dev, "Failed to allocate %pUL\n", &gblock[i].guid);
+               if (!wblock)
                        continue;
-               }
 
                wblock->acpi_device = device;
                wblock->gblock = gblock[i];