lkml.org 
[lkml]   [2006]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Forgotten memset
Panagiotis Issaris wrote:
> --- a/drivers/scsi/ide-scsi.c
> +++ b/drivers/scsi/ide-scsi.c
> @@ -327,7 +327,7 @@ static int idescsi_check_condition(ide_d
>
> /* stuff a sense request in front of our current request */
> pc = kzalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
> - rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
> + rq = kzalloc (sizeof (struct request), GFP_ATOMIC);
> buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
> if (pc == NULL || rq == NULL || buf == NULL) {
> kfree(buf);
>
> Was this forgotten and therefore, is it necessary or useful to zero this
> out?

No, this code snippet is followed by a call to

ide_init_drive_cmd(rq)

which calls memset()


Daniel K.

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

\
 
 \ /
  Last update: 2006-07-19 03:57    [W:0.069 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site