Skip to content

Commit

Permalink
[media] s5p-tv: Fix potential NULL pointer dereference error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Oct 2, 2012
1 parent 94c15b5 commit 970e85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/s5p-tv/mixer_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 970e85f

Please sign in to comment.