* [PATCH] remove pointless NULL check before kfree in sony535.c
@ 2005-05-06 23:19 Jesper Juhl
2005-05-06 23:57 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2005-05-06 23:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Ken Pizzini, Ron Jeppesen, Corey Minyard, akpm
There's no need to check for NULL, kfree() can cope.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
---
drivers/cdrom/sonycd535.c | 1 -
1 files changed, 1 deletion(-)
--- linux-2.6.12-rc3-mm3-orig/drivers/cdrom/sonycd535.c 2005-03-02 08:38:37.000000000 +0100
+++ linux-2.6.12-rc3-mm3/drivers/cdrom/sonycd535.c 2005-05-07 01:13:30.000000000 +0200
@@ -1605,7 +1605,6 @@ out7:
put_disk(cdu_disk);
out6:
for (i = 0; i < sony_buffer_sectors; i++)
- if (sony_buffer[i])
kfree(sony_buffer[i]);
out5:
kfree(sony_buffer);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remove pointless NULL check before kfree in sony535.c
2005-05-06 23:19 [PATCH] remove pointless NULL check before kfree in sony535.c Jesper Juhl
@ 2005-05-06 23:57 ` Dave Jones
2005-05-07 0:06 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2005-05-06 23:57 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel, Ken Pizzini, Ron Jeppesen, Corey Minyard, akpm
On Sat, May 07, 2005 at 01:19:01AM +0200, Jesper Juhl wrote:
> --- linux-2.6.12-rc3-mm3-orig/drivers/cdrom/sonycd535.c 2005-03-02 08:38:37.000000000 +0100
> +++ linux-2.6.12-rc3-mm3/drivers/cdrom/sonycd535.c 2005-05-07 01:13:30.000000000 +0200
> @@ -1605,7 +1605,6 @@ out7:
> put_disk(cdu_disk);
> out6:
> for (i = 0; i < sony_buffer_sectors; i++)
> - if (sony_buffer[i])
> kfree(sony_buffer[i]);
> out5:
This breaks the indentation.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remove pointless NULL check before kfree in sony535.c
2005-05-06 23:57 ` Dave Jones
@ 2005-05-07 0:06 ` Jesper Juhl
0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2005-05-07 0:06 UTC (permalink / raw)
To: Dave Jones
Cc: Jesper Juhl, linux-kernel, Ken Pizzini, Ron Jeppesen,
Corey Minyard, akpm
On Fri, 6 May 2005, Dave Jones wrote:
> On Sat, May 07, 2005 at 01:19:01AM +0200, Jesper Juhl wrote:
> > --- linux-2.6.12-rc3-mm3-orig/drivers/cdrom/sonycd535.c 2005-03-02 08:38:37.000000000 +0100
> > +++ linux-2.6.12-rc3-mm3/drivers/cdrom/sonycd535.c 2005-05-07 01:13:30.000000000 +0200
> > @@ -1605,7 +1605,6 @@ out7:
> > put_disk(cdu_disk);
> > out6:
> > for (i = 0; i < sony_buffer_sectors; i++)
> > - if (sony_buffer[i])
> > kfree(sony_buffer[i]);
> > out5:
>
> This breaks the indentation.
>
Right you are. Sorry about that. Fixed patch below.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
--- linux-2.6.12-rc3-mm3-orig/drivers/cdrom/sonycd535.c 2005-03-02 08:38:37.000000000 +0100
+++ linux-2.6.12-rc3-mm3/drivers/cdrom/sonycd535.c 2005-05-07 02:04:45.000000000 +0200
@@ -1605,8 +1605,7 @@ out7:
put_disk(cdu_disk);
out6:
for (i = 0; i < sony_buffer_sectors; i++)
- if (sony_buffer[i])
- kfree(sony_buffer[i]);
+ kfree(sony_buffer[i]);
out5:
kfree(sony_buffer);
out4:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-07 0:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 23:19 [PATCH] remove pointless NULL check before kfree in sony535.c Jesper Juhl
2005-05-06 23:57 ` Dave Jones
2005-05-07 0:06 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®