Message ID | 1348299559-20952-1-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
On 09/22/2012 09:39 AM, Sachin Kamat wrote: > When mdev is NULL, the error print statement will try to dereference > the NULL pointer. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/media/platform/s5p-tv/mixer_drv.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c > index a15ca05..ca0f297 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; > } > Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
On 09/24/2012 10:52 AM, Tomasz Stanislawski wrote: > On 09/22/2012 09:39 AM, Sachin Kamat wrote: >> When mdev is NULL, the error print statement will try to dereference >> the NULL pointer. >> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> >> --- >> drivers/media/platform/s5p-tv/mixer_drv.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c >> index a15ca05..ca0f297 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; >> } >> > > Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Applied, thanks! Regards, Sylwester
diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c index a15ca05..ca0f297 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; }
When mdev is NULL, the error print statement will try to dereference the NULL pointer. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/media/platform/s5p-tv/mixer_drv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)