[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 <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Sachin Kamat 2012-09-22 03:39:19 -03:00 committed by Mauro Carvalho Chehab
parent 94c15b5e67
commit 970e85f870
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}