If kzalloc() fails, an out-of-memory message is already printed. Remove the unnecessary second warning message. Signed-off-by: Armin Wolf <W_Armin@xxxxxx> --- drivers/platform/x86/wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 545d6696d7cb..396344523bce 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1127,10 +1127,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]; -- 2.39.2