w1: omap-hdq: remove unnecessary ENOMEM messages
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 15 Apr 2023 10:43:03 +0000 (12:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 12:15:07 +0000 (14:15 +0200)
Core already prints detailed reports on out of memory:

  WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230415104304.104134-15-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/omap_hdq.c

index 826207c..6a39b71 100644 (file)
@@ -573,10 +573,8 @@ static int omap_hdq_probe(struct platform_device *pdev)
        const char *mode;
 
        hdq_data = devm_kzalloc(dev, sizeof(*hdq_data), GFP_KERNEL);
-       if (!hdq_data) {
-               dev_dbg(&pdev->dev, "unable to allocate memory\n");
+       if (!hdq_data)
                return -ENOMEM;
-       }
 
        hdq_data->dev = dev;
        platform_set_drvdata(pdev, hdq_data);