soc: samsung: pmu: Remove messages for failed memory allocation
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 19 Jan 2017 13:48:43 +0000 (14:48 +0100)
committerKrzysztof Kozlowski <krzk@kernel.org>
Fri, 20 Jan 2017 16:37:27 +0000 (18:37 +0200)
Memory subsystem already prints message about failed memory
allocation, there is no need to do it in the driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/soc/samsung/exynos-pmu.c

index 1f914e63dcc65691f6ce4b495edf21c86fc1acfe..813df6e7292d7ac4cbf25d33d0e5e166dce6e14b 100644 (file)
@@ -117,10 +117,8 @@ static int exynos_pmu_probe(struct platform_device *pdev)
        pmu_context = devm_kzalloc(&pdev->dev,
                        sizeof(struct exynos_pmu_context),
                        GFP_KERNEL);
-       if (!pmu_context) {
-               dev_err(dev, "Cannot allocate memory.\n");
+       if (!pmu_context)
                return -ENOMEM;
-       }
        pmu_context->dev = dev;
        pmu_context->pmu_data = of_device_get_match_data(dev);