i2c: remove unnecessary OOM messages
authorJingoo Han <jg1.han@samsung.com>
Tue, 13 May 2014 01:51:58 +0000 (10:51 +0900)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 2 Jun 2014 17:24:33 +0000 (19:24 +0200)
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>
15 files changed:
drivers/i2c/busses/i2c-bcm2835.c
drivers/i2c/busses/i2c-diolan-u2c.c
drivers/i2c/busses/i2c-efm32.c
drivers/i2c/busses/i2c-eg20t.c
drivers/i2c/busses/i2c-exynos5.c
drivers/i2c/busses/i2c-imx.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-rcar.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-simtec.c
drivers/i2c/busses/i2c-sirf.c
drivers/i2c/busses/i2c-stu300.c
drivers/i2c/busses/i2c-tegra.c
drivers/i2c/busses/i2c-wmt.c
drivers/i2c/busses/scx200_acb.c

index c60719577fc38f028c08c8e8e06c547ecacf89fc..214ff9700efe84a3d3affec77a6a7a5622556990 100644 (file)
@@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
        struct i2c_adapter *adap;
 
        i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
-       if (!i2c_dev) {
-               dev_err(&pdev->dev, "Cannot allocate i2c_dev\n");
+       if (!i2c_dev)
                return -ENOMEM;
-       }
        platform_set_drvdata(pdev, i2c_dev);
        i2c_dev->dev = &pdev->dev;
        init_completion(&i2c_dev->completion);
index 721f7ebf9a3bcb034867dd8acfbb33236bf21e46..b19a310bf9b3e822121cfcf48c1a01856fcabe67 100644 (file)
@@ -455,7 +455,6 @@ static int diolan_u2c_probe(struct usb_interface *interface,
        /* allocate memory for our device state and initialize it */
        dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (dev == NULL) {
-               dev_err(&interface->dev, "no memory for device state\n");
                ret = -ENOMEM;
                goto error;
        }
index 777ed409a24a4d1bb0582e6abe16494c45cc5da7..f7eccd682de961aa2252b1a780f37cc15f293941 100644 (file)
@@ -320,10 +320,8 @@ static int efm32_i2c_probe(struct platform_device *pdev)
                return -EINVAL;
 
        ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
-       if (!ddata) {
-               dev_dbg(&pdev->dev, "failed to allocate private data\n");
+       if (!ddata)
                return -ENOMEM;
-       }
        platform_set_drvdata(pdev, ddata);
 
        init_completion(&ddata->done);
index ff775ac29e497138f2352a09788ab4a1c4570b6a..a44ea13d143492ffd433a33148870e37f0a1450c 100644 (file)
@@ -751,10 +751,8 @@ static int pch_i2c_probe(struct pci_dev *pdev,
        pch_pci_dbg(pdev, "Entered.\n");
 
        adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL);
-       if (adap_info == NULL) {
-               pch_pci_err(pdev, "Memory allocation FAILED\n");
+       if (adap_info == NULL)
                return -ENOMEM;
-       }
 
        ret = pci_enable_device(pdev);
        if (ret) {
index ba1faf0ef96f40035403f7fd06581649d2aa41d7..63d22920285452694c983801cd7bc24a527cabf6 100644 (file)
@@ -662,10 +662,8 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
        int ret;
 
        i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL);
-       if (!i2c) {
-               dev_err(&pdev->dev, "no memory for state\n");
+       if (!i2c)
                return -ENOMEM;
-       }
 
        if (of_property_read_u32(np, "clock-frequency", &op_clock)) {
                i2c->speed_mode = HSI2C_FAST_SPD;
index fe53207a6ebba11b4eb476a121cde03be3e8d286..aa8bc146718bfc13c562e11322ddf36d9442f2c7 100644 (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),
                                GFP_KERNEL);
-       if (!i2c_imx) {
-               dev_err(&pdev->dev, "can't allocate interface\n");
+       if (!i2c_imx)
                return -ENOMEM;
-       }
 
        if (of_id)
                i2c_imx->hwdata = of_id->data;
index 85f8eac9ba1832ab9b308b50e10c40a754f3fcd8..b182793a40518ef12efedc539487232c7e544f36 100644 (file)
@@ -1114,10 +1114,8 @@ omap_i2c_probe(struct platform_device *pdev)
        }
 
        dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL);
-       if (!dev) {
-               dev_err(&pdev->dev, "Menory allocation failed\n");
+       if (!dev)
                return -ENOMEM;
-       }
 
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        dev->base = devm_ioremap_resource(&pdev->dev, mem);
index 71e88d05550039a9a2c4b98f45362246ef9a7a13..8994059236786e88b42185b3edbe916b3fb98bd8 100644 (file)
@@ -509,10 +509,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
        int irq, ret;
 
        priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
-       if (!priv) {
-               dev_err(dev, "no mem for private data\n");
+       if (!priv)
                return -ENOMEM;
-       }
 
        priv->clk = devm_clk_get(dev, NULL);
        if (IS_ERR(priv->clk)) {
index bb3a9964f7e00c2b2c604e32490b0c5f015c4bfe..e828a1dba0e5a5d4cafdcfaf4c1188df89f04b1a 100644 (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);
-       if (!i2c) {
-               dev_err(&pdev->dev, "no memory for state\n");
+       if (!i2c)
                return -ENOMEM;
-       }
 
        i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-       if (!i2c->pdata) {
-               dev_err(&pdev->dev, "no memory for platform data\n");
+       if (!i2c->pdata)
                return -ENOMEM;
-       }
 
        i2c->quirks = s3c24xx_get_device_quirks(pdev);
        if (pdata)
index 294c80f21d65163b86e17d27a0101a3b3b921b50..964e5c6f84abcecf0e3d82d795613c216489c54d 100644 (file)
@@ -77,10 +77,8 @@ static int simtec_i2c_probe(struct platform_device *dev)
        int ret;
 
        pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL);
-       if (pd == NULL) {
-               dev_err(&dev->dev, "cannot allocate private data\n");
+       if (pd == NULL)
                return -ENOMEM;
-       }
 
        platform_set_drvdata(dev, pd);
 
index 8e3be7ed0586a5f1037fc5e84a5bd648d6193acc..a3216defc1d3c61888f9b26f19d694b8efb0c636 100644 (file)
@@ -307,7 +307,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
 
        siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL);
        if (!siic) {
-               dev_err(&pdev->dev, "Can't allocate driver data\n");
                err = -ENOMEM;
                goto out;
        }
index 29b1fb778943c574b5c93896c80ed2dfe5074bf0..fefb1c19ec1de9cc834e22ce7199384592beb6e4 100644 (file)
@@ -868,10 +868,8 @@ static int stu300_probe(struct platform_device *pdev)
        int ret = 0;
 
        dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL);
-       if (!dev) {
-               dev_err(&pdev->dev, "could not allocate device struct\n");
+       if (!dev)
                return -ENOMEM;
-       }
 
        bus_nr = pdev->id;
        dev->clk = devm_clk_get(&pdev->dev, NULL);
index 00f04cb5b4eb1bfcdd0a8719c884fc15497230c4..f1bb2fc06791cd80395df4ea65609bdb01e543ca 100644 (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);
-       if (!i2c_dev) {
-               dev_err(&pdev->dev, "Could not allocate struct tegra_i2c_dev");
+       if (!i2c_dev)
                return -ENOMEM;
-       }
 
        i2c_dev->base = base;
        i2c_dev->div_clk = div_clk;
index 2c8a3e4f900890e11f3fd1f14c0e15aa78d2ecce..889a212b6c3da313efc52f3bd92b48442efc92e5 100644 (file)
@@ -379,10 +379,8 @@ static int wmt_i2c_probe(struct platform_device *pdev)
        u32 clk_rate;
 
        i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
-       if (!i2c_dev) {
-               dev_err(&pdev->dev, "device memory allocation failed\n");
+       if (!i2c_dev)
                return -ENOMEM;
-       }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        i2c_dev->base = devm_ioremap_resource(&pdev->dev, res);
index cb66f9586f76b765c839f64b49a18f745d8075c0..ff3f5747e43b99123b5a3db733f4ac4c1925b394 100644 (file)
@@ -431,10 +431,8 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text,
        struct i2c_adapter *adapter;
 
        iface = kzalloc(sizeof(*iface), GFP_KERNEL);
-       if (!iface) {
-               pr_err("can't allocate memory\n");
+       if (!iface)
                return NULL;
-       }
 
        adapter = &iface->adapter;
        i2c_set_adapdata(adapter, iface);