From e1c9ac420ef15e39c2ead879cda1677d1e5cb2b6 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Mon, 30 Jul 2012 10:40:28 +0200 Subject: Revert "backlight: fix memory leak on obscure error path" This reverts commit 9ea3c498962bc63748e92c31c874169ab0726324. 'data' is being allocated by devm_kzalloc(), is it's actually wrong to free() it in the error path, as it will be destroyed properly later. Reported-by: Andrew Morton Signed-off-by: Jiri Kosina --- drivers/video/backlight/88pm860x_bl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index f75da8758ad..f49181c7311 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c @@ -228,7 +228,6 @@ static int pm860x_backlight_probe(struct platform_device *pdev) data->port = pdata->flags; if (data->port < 0) { dev_err(&pdev->dev, "wrong platform data is assigned"); - kfree(data); return -EINVAL; } -- cgit v1.2.3-18-g5258 From 40dc23aa82d51147a24f659a7c006ae4bb14009a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 24 Jul 2012 13:43:48 +0100 Subject: tmiofb: missing NULL pointer checks Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44471 Reported-by: Signed-off-by: Alan Cox Signed-off-by: Jiri Kosina --- drivers/video/tmiofb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 8e4a446b5ed..b244f060f15 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c @@ -694,6 +694,10 @@ static int __devinit tmiofb_probe(struct platform_device *dev) dev_err(&dev->dev, "NULL platform data!\n"); return -EINVAL; } + if (ccr == NULL || lcr == NULL || vram == NULL || irq < 0) { + dev_err(&dev->dev, "missing resources\n"); + return -EINVAL; + } info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev); -- cgit v1.2.3-18-g5258 From 4907cb7b193a4f91c1fd30cf679c035e3644c64d Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Sat, 1 Sep 2012 10:31:09 -0700 Subject: treewide: fix comment/printk/variable typos Signed-off-by: Anatol Pomozov Signed-off-by: Jiri Kosina --- drivers/video/exynos/exynos_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index 9908e75ae76..752a12e625e 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c @@ -461,7 +461,7 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) done: platform_set_drvdata(pdev, dsim); - dev_dbg(&pdev->dev, "%s() completed sucessfuly (%s mode)\n", __func__, + dev_dbg(&pdev->dev, "%s() completed successfully (%s mode)\n", __func__, dsim_config->e_interface == DSIM_COMMAND ? "CPU" : "RGB"); return 0; -- cgit v1.2.3-18-g5258