From: Marek Szyprowski Date: Thu, 19 Jan 2017 13:48:43 +0000 (+0100) Subject: soc: samsung: pmu: Remove messages for failed memory allocation X-Git-Tag: v4.11-rc1~85^2~12^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1da6de33e43901ec5220cbf292d71172635ada67;p=thirdparty%2Fkernel%2Flinux.git soc: samsung: pmu: Remove messages for failed memory allocation Memory subsystem already prints message about failed memory allocation, there is no need to do it in the driver. Signed-off-by: Marek Szyprowski Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski --- diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 1f914e63dcc65..813df6e7292d7 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -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);