linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] s5p-tv: Fix potential NULL pointer dereference error
@ 2012-09-22  7:39 Sachin Kamat
  2012-09-24  8:52 ` Tomasz Stanislawski
  0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2012-09-22  7:39 UTC (permalink / raw)
  To: linux-media; +Cc: t.stanislaws, s.nawrocki, mchehab, sachin.kamat, patches

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] s5p-tv: Fix potential NULL pointer dereference error
  2012-09-22  7:39 [PATCH] [media] s5p-tv: Fix potential NULL pointer dereference error Sachin Kamat
@ 2012-09-24  8:52 ` Tomasz Stanislawski
  2012-09-26  8:50   ` Sylwester Nawrocki
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Stanislawski @ 2012-09-24  8:52 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-media, s.nawrocki, mchehab, patches

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] s5p-tv: Fix potential NULL pointer dereference error
  2012-09-24  8:52 ` Tomasz Stanislawski
@ 2012-09-26  8:50   ` Sylwester Nawrocki
  0 siblings, 0 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2012-09-26  8:50 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: Tomasz Stanislawski, linux-media, patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-26  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-22  7:39 [PATCH] [media] s5p-tv: Fix potential NULL pointer dereference error Sachin Kamat
2012-09-24  8:52 ` Tomasz Stanislawski
2012-09-26  8:50   ` Sylwester Nawrocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).