From 0a16ee633a83374a2bedbd6a057ab7d7e50a1d50 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Wed, 23 Jul 2014 10:07:09 +0900 Subject: extcon: Remove unnecessary OOM messages The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. The following checkpatch warning is also removed. WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Jingoo Han [Acked by Charles Keepax for arizona part] Acked-by: Charles Keepax Signed-off-by: Chanwoo Choi --- drivers/extcon/extcon-arizona.c | 4 +--- drivers/extcon/extcon-max14577.c | 5 ++--- drivers/extcon/extcon-max77693.c | 5 ++--- drivers/extcon/extcon-max8997.c | 4 +--- 4 files changed, 6 insertions(+), 12 deletions(-) (limited to 'drivers/extcon') diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 0b1ee9f5537..59aa5130946 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1117,10 +1117,8 @@ static int arizona_extcon_probe(struct platform_device *pdev) return -EPROBE_DEFER; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); - if (!info) { - dev_err(&pdev->dev, "Failed to allocate memory\n"); + if (!info) return -ENOMEM; - } info->micvdd = devm_regulator_get(arizona->dev, "MICVDD"); if (IS_ERR(info->micvdd)) { diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index d49e891b567..7309743d0da 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c @@ -692,10 +692,9 @@ static int max14577_muic_probe(struct platform_device *pdev) u8 id; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); - if (!info) { - dev_err(&pdev->dev, "failed to allocate memory\n"); + if (!info) return -ENOMEM; - } + info->dev = &pdev->dev; info->max14577 = max14577; diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 042bf742c20..77460f2c1ca 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -1099,10 +1099,9 @@ static int max77693_muic_probe(struct platform_device *pdev) info = devm_kzalloc(&pdev->dev, sizeof(struct max77693_muic_info), GFP_KERNEL); - if (!info) { - dev_err(&pdev->dev, "failed to allocate memory\n"); + if (!info) return -ENOMEM; - } + info->dev = &pdev->dev; info->max77693 = max77693; if (info->max77693->regmap_muic) { diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index d22c379766d..75e501c9800 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -661,10 +661,8 @@ static int max8997_muic_probe(struct platform_device *pdev) info = devm_kzalloc(&pdev->dev, sizeof(struct max8997_muic_info), GFP_KERNEL); - if (!info) { - dev_err(&pdev->dev, "failed to allocate memory\n"); + if (!info) return -ENOMEM; - } info->dev = &pdev->dev; info->muic = max8997->muic; -- cgit v1.2.3-70-g09d2