From: Krzysztof Kozlowski Date: Thu, 26 Feb 2015 09:13:51 +0000 (+0100) Subject: mfd: sec: Remove unnecessary out of memory message X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=82a00c49ed97cf5b9aa96bd6cda2021720578ecc;p=linux-beck.git mfd: sec: Remove unnecessary out of memory message There is no need to print additional ENOMEM message for sec_platform_data allocation failure. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 423a2d3da4b2..2253d44e631c 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata( struct sec_platform_data *pd; pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); - if (!pd) { - dev_err(dev, "could not allocate memory for pdata\n"); + if (!pd) return ERR_PTR(-ENOMEM); - } /* * ToDo: the 'wakeup' member in the platform data is more of a linux