From: Sachin Kamat Date: Sat, 22 Sep 2012 06:39:19 +0000 (-0300) Subject: [media] s5p-tv: Fix potential NULL pointer dereference error X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=970e85f87067638262a5c165aff404e6190817f8;p=openwrt%2Fstaging%2Fblogic.git [media] s5p-tv: Fix potential NULL pointer dereference error When mdev is NULL, the error print statement will try to dereference the NULL pointer. Signed-off-by: Sachin Kamat Acked-by: Tomasz Stanislawski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c index a15ca0595b87..ca0f29717448 100644 --- a/drivers/media/platform/s5p-tv/mixer_drv.c +++ b/drivers/media/platform/s5p-tv/mixer_drv.c @@ -384,7 +384,7 @@ static int __devinit mxr_probe(struct platform_device *pdev) mdev = kzalloc(sizeof *mdev, GFP_KERNEL); if (!mdev) { - mxr_err(mdev, "not enough memory.\n"); + dev_err(dev, "not enough memory.\n"); ret = -ENOMEM; goto fail; }