diff options
author | Jingoo Han <jg1.han@samsung.com> | 2014-05-12 21:51:58 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-06-02 13:24:33 -0400 |
commit | 46797a2adbf0cdc3be17707dc64e872eeed86a8a (patch) | |
tree | 36096aad59849065a686399bdfcb5d997707e5b8 | |
parent | 157a801e5042c7da5323c7d77bd818c7d845af14 (diff) |
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>
-rw-r--r-- | drivers/i2c/busses/i2c-bcm2835.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-diolan-u2c.c | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-efm32.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-eg20t.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-exynos5.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 8 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-simtec.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-sirf.c | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-stu300.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-tegra.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-wmt.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 4 |
15 files changed, 14 insertions, 44 deletions
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index c60719577fc3..214ff9700efe 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c | |||
@@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) | |||
225 | struct i2c_adapter *adap; | 225 | struct i2c_adapter *adap; |
226 | 226 | ||
227 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); | 227 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); |
228 | if (!i2c_dev) { | 228 | if (!i2c_dev) |
229 | dev_err(&pdev->dev, "Cannot allocate i2c_dev\n"); | ||
230 | return -ENOMEM; | 229 | return -ENOMEM; |
231 | } | ||
232 | platform_set_drvdata(pdev, i2c_dev); | 230 | platform_set_drvdata(pdev, i2c_dev); |
233 | i2c_dev->dev = &pdev->dev; | 231 | i2c_dev->dev = &pdev->dev; |
234 | init_completion(&i2c_dev->completion); | 232 | init_completion(&i2c_dev->completion); |
diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c index 721f7ebf9a3b..b19a310bf9b3 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c | |||
@@ -455,7 +455,6 @@ static int diolan_u2c_probe(struct usb_interface *interface, | |||
455 | /* allocate memory for our device state and initialize it */ | 455 | /* allocate memory for our device state and initialize it */ |
456 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 456 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
457 | if (dev == NULL) { | 457 | if (dev == NULL) { |
458 | dev_err(&interface->dev, "no memory for device state\n"); | ||
459 | ret = -ENOMEM; | 458 | ret = -ENOMEM; |
460 | goto error; | 459 | goto error; |
461 | } | 460 | } |
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c index 777ed409a24a..f7eccd682de9 100644 --- a/drivers/i2c/busses/i2c-efm32.c +++ b/drivers/i2c/busses/i2c-efm32.c | |||
@@ -320,10 +320,8 @@ static int efm32_i2c_probe(struct platform_device *pdev) | |||
320 | return -EINVAL; | 320 | return -EINVAL; |
321 | 321 | ||
322 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 322 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
323 | if (!ddata) { | 323 | if (!ddata) |
324 | dev_dbg(&pdev->dev, "failed to allocate private data\n"); | ||
325 | return -ENOMEM; | 324 | return -ENOMEM; |
326 | } | ||
327 | platform_set_drvdata(pdev, ddata); | 325 | platform_set_drvdata(pdev, ddata); |
328 | 326 | ||
329 | init_completion(&ddata->done); | 327 | init_completion(&ddata->done); |
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index ff775ac29e49..a44ea13d1434 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c | |||
@@ -751,10 +751,8 @@ static int pch_i2c_probe(struct pci_dev *pdev, | |||
751 | pch_pci_dbg(pdev, "Entered.\n"); | 751 | pch_pci_dbg(pdev, "Entered.\n"); |
752 | 752 | ||
753 | adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL); | 753 | adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL); |
754 | if (adap_info == NULL) { | 754 | if (adap_info == NULL) |
755 | pch_pci_err(pdev, "Memory allocation FAILED\n"); | ||
756 | return -ENOMEM; | 755 | return -ENOMEM; |
757 | } | ||
758 | 756 | ||
759 | ret = pci_enable_device(pdev); | 757 | ret = pci_enable_device(pdev); |
760 | if (ret) { | 758 | if (ret) { |
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index ba1faf0ef96f..63d229202854 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c | |||
@@ -662,10 +662,8 @@ static int exynos5_i2c_probe(struct platform_device *pdev) | |||
662 | int ret; | 662 | int ret; |
663 | 663 | ||
664 | i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL); | 664 | i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL); |
665 | if (!i2c) { | 665 | if (!i2c) |
666 | dev_err(&pdev->dev, "no memory for state\n"); | ||
667 | return -ENOMEM; | 666 | return -ENOMEM; |
668 | } | ||
669 | 667 | ||
670 | if (of_property_read_u32(np, "clock-frequency", &op_clock)) { | 668 | if (of_property_read_u32(np, "clock-frequency", &op_clock)) { |
671 | i2c->speed_mode = HSI2C_FAST_SPD; | 669 | i2c->speed_mode = HSI2C_FAST_SPD; |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index fe53207a6ebb..aa8bc146718b 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -667,10 +667,8 @@ static int i2c_imx_probe(struct platform_device *pdev) | |||
667 | 667 | ||
668 | i2c_imx = devm_kzalloc(&pdev->dev, sizeof(struct imx_i2c_struct), | 668 | i2c_imx = devm_kzalloc(&pdev->dev, sizeof(struct imx_i2c_struct), |
669 | GFP_KERNEL); | 669 | GFP_KERNEL); |
670 | if (!i2c_imx) { | 670 | if (!i2c_imx) |
671 | dev_err(&pdev->dev, "can't allocate interface\n"); | ||
672 | return -ENOMEM; | 671 | return -ENOMEM; |
673 | } | ||
674 | 672 | ||
675 | if (of_id) | 673 | if (of_id) |
676 | i2c_imx->hwdata = of_id->data; | 674 | i2c_imx->hwdata = of_id->data; |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 85f8eac9ba18..b182793a4051 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -1114,10 +1114,8 @@ omap_i2c_probe(struct platform_device *pdev) | |||
1114 | } | 1114 | } |
1115 | 1115 | ||
1116 | dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL); | 1116 | dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL); |
1117 | if (!dev) { | 1117 | if (!dev) |
1118 | dev_err(&pdev->dev, "Menory allocation failed\n"); | ||
1119 | return -ENOMEM; | 1118 | return -ENOMEM; |
1120 | } | ||
1121 | 1119 | ||
1122 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1120 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1123 | dev->base = devm_ioremap_resource(&pdev->dev, mem); | 1121 | dev->base = devm_ioremap_resource(&pdev->dev, mem); |
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 71e88d055500..899405923678 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c | |||
@@ -509,10 +509,8 @@ static int rcar_i2c_probe(struct platform_device *pdev) | |||
509 | int irq, ret; | 509 | int irq, ret; |
510 | 510 | ||
511 | priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); | 511 | priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); |
512 | if (!priv) { | 512 | if (!priv) |
513 | dev_err(dev, "no mem for private data\n"); | ||
514 | return -ENOMEM; | 513 | return -ENOMEM; |
515 | } | ||
516 | 514 | ||
517 | priv->clk = devm_clk_get(dev, NULL); | 515 | priv->clk = devm_clk_get(dev, NULL); |
518 | if (IS_ERR(priv->clk)) { | 516 | if (IS_ERR(priv->clk)) { |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index bb3a9964f7e0..e828a1dba0e5 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -1114,16 +1114,12 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
1114 | } | 1114 | } |
1115 | 1115 | ||
1116 | i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL); | 1116 | i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL); |
1117 | if (!i2c) { | 1117 | if (!i2c) |
1118 | dev_err(&pdev->dev, "no memory for state\n"); | ||
1119 | return -ENOMEM; | 1118 | return -ENOMEM; |
1120 | } | ||
1121 | 1119 | ||
1122 | i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 1120 | i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
1123 | if (!i2c->pdata) { | 1121 | if (!i2c->pdata) |
1124 | dev_err(&pdev->dev, "no memory for platform data\n"); | ||
1125 | return -ENOMEM; | 1122 | return -ENOMEM; |
1126 | } | ||
1127 | 1123 | ||
1128 | i2c->quirks = s3c24xx_get_device_quirks(pdev); | 1124 | i2c->quirks = s3c24xx_get_device_quirks(pdev); |
1129 | if (pdata) | 1125 | if (pdata) |
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 294c80f21d65..964e5c6f84ab 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
@@ -77,10 +77,8 @@ static int simtec_i2c_probe(struct platform_device *dev) | |||
77 | int ret; | 77 | int ret; |
78 | 78 | ||
79 | pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL); | 79 | pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL); |
80 | if (pd == NULL) { | 80 | if (pd == NULL) |
81 | dev_err(&dev->dev, "cannot allocate private data\n"); | ||
82 | return -ENOMEM; | 81 | return -ENOMEM; |
83 | } | ||
84 | 82 | ||
85 | platform_set_drvdata(dev, pd); | 83 | platform_set_drvdata(dev, pd); |
86 | 84 | ||
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c index 8e3be7ed0586..a3216defc1d3 100644 --- a/drivers/i2c/busses/i2c-sirf.c +++ b/drivers/i2c/busses/i2c-sirf.c | |||
@@ -307,7 +307,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev) | |||
307 | 307 | ||
308 | siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL); | 308 | siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL); |
309 | if (!siic) { | 309 | if (!siic) { |
310 | dev_err(&pdev->dev, "Can't allocate driver data\n"); | ||
311 | err = -ENOMEM; | 310 | err = -ENOMEM; |
312 | goto out; | 311 | goto out; |
313 | } | 312 | } |
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 29b1fb778943..fefb1c19ec1d 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c | |||
@@ -868,10 +868,8 @@ static int stu300_probe(struct platform_device *pdev) | |||
868 | int ret = 0; | 868 | int ret = 0; |
869 | 869 | ||
870 | dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL); | 870 | dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL); |
871 | if (!dev) { | 871 | if (!dev) |
872 | dev_err(&pdev->dev, "could not allocate device struct\n"); | ||
873 | return -ENOMEM; | 872 | return -ENOMEM; |
874 | } | ||
875 | 873 | ||
876 | bus_nr = pdev->id; | 874 | bus_nr = pdev->id; |
877 | dev->clk = devm_clk_get(&pdev->dev, NULL); | 875 | dev->clk = devm_clk_get(&pdev->dev, NULL); |
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 00f04cb5b4eb..f1bb2fc06791 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c | |||
@@ -732,10 +732,8 @@ static int tegra_i2c_probe(struct platform_device *pdev) | |||
732 | } | 732 | } |
733 | 733 | ||
734 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); | 734 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); |
735 | if (!i2c_dev) { | 735 | if (!i2c_dev) |
736 | dev_err(&pdev->dev, "Could not allocate struct tegra_i2c_dev"); | ||
737 | return -ENOMEM; | 736 | return -ENOMEM; |
738 | } | ||
739 | 737 | ||
740 | i2c_dev->base = base; | 738 | i2c_dev->base = base; |
741 | i2c_dev->div_clk = div_clk; | 739 | i2c_dev->div_clk = div_clk; |
diff --git a/drivers/i2c/busses/i2c-wmt.c b/drivers/i2c/busses/i2c-wmt.c index 2c8a3e4f9008..889a212b6c3d 100644 --- a/drivers/i2c/busses/i2c-wmt.c +++ b/drivers/i2c/busses/i2c-wmt.c | |||
@@ -379,10 +379,8 @@ static int wmt_i2c_probe(struct platform_device *pdev) | |||
379 | u32 clk_rate; | 379 | u32 clk_rate; |
380 | 380 | ||
381 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); | 381 | i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL); |
382 | if (!i2c_dev) { | 382 | if (!i2c_dev) |
383 | dev_err(&pdev->dev, "device memory allocation failed\n"); | ||
384 | return -ENOMEM; | 383 | return -ENOMEM; |
385 | } | ||
386 | 384 | ||
387 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
388 | i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); | 386 | i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index cb66f9586f76..ff3f5747e43b 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -431,10 +431,8 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text, | |||
431 | struct i2c_adapter *adapter; | 431 | struct i2c_adapter *adapter; |
432 | 432 | ||
433 | iface = kzalloc(sizeof(*iface), GFP_KERNEL); | 433 | iface = kzalloc(sizeof(*iface), GFP_KERNEL); |
434 | if (!iface) { | 434 | if (!iface) |
435 | pr_err("can't allocate memory\n"); | ||
436 | return NULL; | 435 | return NULL; |
437 | } | ||
438 | 436 | ||
439 | adapter = &iface->adapter; | 437 | adapter = &iface->adapter; |
440 | i2c_set_adapdata(adapter, iface); | 438 | i2c_set_adapdata(adapter, iface); |