Re: [PATCH] drivers/media/video/videocodec.c: check kmalloc() return value.

2007-03-12 Thread Ahmed S. Darwish
Hi Amit,

On Thu, Mar 08, 2007 at 11:14:01PM -0800, Amit Choudhary wrote:
> Description: Check the return value of kmalloc() in function 
> videocodec_build_table(), in file drivers/media/video/videocodec.c.

No need for `Description:'. This line is automatically put in the logs 
as a patch description if the patch got accepted. 

It's better not to use very large lines. 

Also there's no need to specify the exact function in the log, it's already
displayed in the patch.

> 
> Signed-off-by: Amit Choudhary <[EMAIL PROTECTED]>
> 

As said in Documentation/SubmittingPatches put a "---" line after
Signed-off-by signature.

Thanks,

-- 
Ahmed S. Darwish
http://darwish.07.googlepages.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers/media/video/videocodec.c: check kmalloc() return value.

2007-03-12 Thread Ahmed S. Darwish
Hi Amit,

On Thu, Mar 08, 2007 at 11:14:01PM -0800, Amit Choudhary wrote:
 Description: Check the return value of kmalloc() in function 
 videocodec_build_table(), in file drivers/media/video/videocodec.c.

No need for `Description:'. This line is automatically put in the logs 
as a patch description if the patch got accepted. 

It's better not to use very large lines. 

Also there's no need to specify the exact function in the log, it's already
displayed in the patch.

 
 Signed-off-by: Amit Choudhary [EMAIL PROTECTED]
 

As said in Documentation/SubmittingPatches put a --- line after
Signed-off-by signature.

Thanks,

-- 
Ahmed S. Darwish
http://darwish.07.googlepages.com

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers/media/video/videocodec.c: check kmalloc() return value.

2007-03-09 Thread Andrey Panin
On 067, 03 08, 2007 at 11:14:01PM -0800, Amit Choudhary wrote:
> Description: Check the return value of kmalloc() in function 
> videocodec_build_table(), in file drivers/media/video/videocodec.c.
> 
> Signed-off-by: Amit Choudhary <[EMAIL PROTECTED]>
> 
> diff --git a/drivers/media/video/videocodec.c 
> b/drivers/media/video/videocodec.c
> index 2ae3fb2..16fc1dd 100644
> --- a/drivers/media/video/videocodec.c
> +++ b/drivers/media/video/videocodec.c
> @@ -348,6 +348,8 @@ #define LINESIZE 100
>   kfree(videocodec_buf);
>   videocodec_buf = (char *) kmalloc(size, GFP_KERNEL);
>  
> + if (!videocodec_buf)
> + return 0;
>   i = 0;
>   i += scnprintf(videocodec_buf + i, size - 1,
> "lave or attached aster name  type flagsmagic   
>  ");

Can you also remove useless (char *) cast above ?

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature


Re: [PATCH] drivers/media/video/videocodec.c: check kmalloc() return value.

2007-03-09 Thread Andrey Panin
On 067, 03 08, 2007 at 11:14:01PM -0800, Amit Choudhary wrote:
 Description: Check the return value of kmalloc() in function 
 videocodec_build_table(), in file drivers/media/video/videocodec.c.
 
 Signed-off-by: Amit Choudhary [EMAIL PROTECTED]
 
 diff --git a/drivers/media/video/videocodec.c 
 b/drivers/media/video/videocodec.c
 index 2ae3fb2..16fc1dd 100644
 --- a/drivers/media/video/videocodec.c
 +++ b/drivers/media/video/videocodec.c
 @@ -348,6 +348,8 @@ #define LINESIZE 100
   kfree(videocodec_buf);
   videocodec_buf = (char *) kmalloc(size, GFP_KERNEL);
  
 + if (!videocodec_buf)
 + return 0;
   i = 0;
   i += scnprintf(videocodec_buf + i, size - 1,
 Slave or attached Master name  type flagsmagic   
  );

Can you also remove useless (char *) cast above ?

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature