i2c: remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message. For example,
k.alloc and v.alloc failures use dump_stack().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Jingoo Han 2014-05-13 10:51:58 +09:00 committed by Wolfram Sang
parent 157a801e50
commit 46797a2adb
15 changed files with 14 additions and 44 deletions

View File

@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
struct i2c_adapter *adap; struct i2c_adapter *adap;
i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
if (!i2c_dev) { if (!i2c_dev)
dev_err(&pdev->dev, "Cannot allocate i2c_dev\n");
return -ENOMEM; return -ENOMEM;
}
platform_set_drvdata(pdev, i2c_dev); platform_set_drvdata(pdev, i2c_dev);
i2c_dev->dev = &pdev->dev; i2c_dev->dev = &pdev->dev;
init_completion(&i2c_dev->completion); init_completion(&i2c_dev->completion);

View File

@ -455,7 +455,6 @@ static int diolan_u2c_probe(struct usb_interface *interface,
/* allocate memory for our device state and initialize it */ /* allocate memory for our device state and initialize it */
dev = kzalloc(sizeof(*dev), GFP_KERNEL); dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (dev == NULL) { if (dev == NULL) {
dev_err(&interface->dev, "no memory for device state\n");
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
} }

View File

@ -320,10 +320,8 @@ static int efm32_i2c_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata) { if (!ddata)
dev_dbg(&pdev->dev, "failed to allocate private data\n");
return -ENOMEM; return -ENOMEM;
}
platform_set_drvdata(pdev, ddata); platform_set_drvdata(pdev, ddata);
init_completion(&ddata->done); init_completion(&ddata->done);

View File

@ -751,10 +751,8 @@ static int pch_i2c_probe(struct pci_dev *pdev,
pch_pci_dbg(pdev, "Entered.\n"); pch_pci_dbg(pdev, "Entered.\n");
adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL); adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL);
if (adap_info == NULL) { if (adap_info == NULL)
pch_pci_err(pdev, "Memory allocation FAILED\n");
return -ENOMEM; return -ENOMEM;
}
ret = pci_enable_device(pdev); ret = pci_enable_device(pdev);
if (ret) { if (ret) {

View File

@ -662,10 +662,8 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
int ret; int ret;
i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL); i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL);
if (!i2c) { if (!i2c)
dev_err(&pdev->dev, "no memory for state\n");
return -ENOMEM; return -ENOMEM;
}
if (of_property_read_u32(np, "clock-frequency", &op_clock)) { if (of_property_read_u32(np, "clock-frequency", &op_clock)) {
i2c->speed_mode = HSI2C_FAST_SPD; i2c->speed_mode = HSI2C_FAST_SPD;

View File

@ -667,10 +667,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
i2c_imx = devm_kzalloc(&pdev->dev, sizeof(struct imx_i2c_struct), i2c_imx = devm_kzalloc(&pdev->dev, sizeof(struct imx_i2c_struct),
GFP_KERNEL); GFP_KERNEL);
if (!i2c_imx) { if (!i2c_imx)
dev_err(&pdev->dev, "can't allocate interface\n");
return -ENOMEM; return -ENOMEM;
}
if (of_id) if (of_id)
i2c_imx->hwdata = of_id->data; i2c_imx->hwdata = of_id->data;

View File

@ -1114,10 +1114,8 @@ omap_i2c_probe(struct platform_device *pdev)
} }
dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL); dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL);
if (!dev) { if (!dev)
dev_err(&pdev->dev, "Menory allocation failed\n");
return -ENOMEM; return -ENOMEM;
}
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dev->base = devm_ioremap_resource(&pdev->dev, mem); dev->base = devm_ioremap_resource(&pdev->dev, mem);

View File

@ -509,10 +509,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
int irq, ret; int irq, ret;
priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
if (!priv) { if (!priv)
dev_err(dev, "no mem for private data\n");
return -ENOMEM; return -ENOMEM;
}
priv->clk = devm_clk_get(dev, NULL); priv->clk = devm_clk_get(dev, NULL);
if (IS_ERR(priv->clk)) { if (IS_ERR(priv->clk)) {

View File

@ -1114,16 +1114,12 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
} }
i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL); i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL);
if (!i2c) { if (!i2c)
dev_err(&pdev->dev, "no memory for state\n");
return -ENOMEM; return -ENOMEM;
}
i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!i2c->pdata) { if (!i2c->pdata)
dev_err(&pdev->dev, "no memory for platform data\n");
return -ENOMEM; return -ENOMEM;
}
i2c->quirks = s3c24xx_get_device_quirks(pdev); i2c->quirks = s3c24xx_get_device_quirks(pdev);
if (pdata) if (pdata)

View File

@ -77,10 +77,8 @@ static int simtec_i2c_probe(struct platform_device *dev)
int ret; int ret;
pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL); pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL);
if (pd == NULL) { if (pd == NULL)
dev_err(&dev->dev, "cannot allocate private data\n");
return -ENOMEM; return -ENOMEM;
}
platform_set_drvdata(dev, pd); platform_set_drvdata(dev, pd);

View File

@ -307,7 +307,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL); siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL);
if (!siic) { if (!siic) {
dev_err(&pdev->dev, "Can't allocate driver data\n");
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }

View File

@ -868,10 +868,8 @@ static int stu300_probe(struct platform_device *pdev)
int ret = 0; int ret = 0;
dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL); dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL);
if (!dev) { if (!dev)
dev_err(&pdev->dev, "could not allocate device struct\n");
return -ENOMEM; return -ENOMEM;
}
bus_nr = pdev->id; bus_nr = pdev->id;
dev->clk = devm_clk_get(&pdev->dev, NULL); dev->clk = devm_clk_get(&pdev->dev, NULL);

View File

@ -732,10 +732,8 @@ static int tegra_i2c_probe(struct platform_device *pdev)
} }
i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
if (!i2c_dev) { if (!i2c_dev)
dev_err(&pdev->dev, "Could not allocate struct tegra_i2c_dev");
return -ENOMEM; return -ENOMEM;
}
i2c_dev->base = base; i2c_dev->base = base;
i2c_dev->div_clk = div_clk; i2c_dev->div_clk = div_clk;

View File

@ -379,10 +379,8 @@ static int wmt_i2c_probe(struct platform_device *pdev)
u32 clk_rate; u32 clk_rate;
i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
if (!i2c_dev) { if (!i2c_dev)
dev_err(&pdev->dev, "device memory allocation failed\n");
return -ENOMEM; return -ENOMEM;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); i2c_dev->base = devm_ioremap_resource(&pdev->dev, res);

View File

@ -431,10 +431,8 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text,
struct i2c_adapter *adapter; struct i2c_adapter *adapter;
iface = kzalloc(sizeof(*iface), GFP_KERNEL); iface = kzalloc(sizeof(*iface), GFP_KERNEL);
if (!iface) { if (!iface)
pr_err("can't allocate memory\n");
return NULL; return NULL;
}
adapter = &iface->adapter; adapter = &iface->adapter;
i2c_set_adapdata(adapter, iface); i2c_set_adapdata(adapter, iface);