Message ID | 1348299559-20952-1-git-send-email-sachin.kamat@linaro.org (mailing list archive) |
---|---|
State | New, archived |
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> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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(-)