lkml.org 
[lkml]   [2005]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/14] Big kfree NULL check cleanup - drivers/media
Jesper Juhl wrote:

>This is the drivers/media/ part of the big kfree cleanup patch.
>
>Remove pointless checks for NULL prior to calling kfree() in drivers/media/.
>
>
>Sorry about the long Cc: list, but I wanted to make sure I included everyone
>who's code I've changed with this patch.
>
>
>Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
>---
>
>Please see the initial announcement mail on LKML with subject
>"[PATCH 00/14] Big kfree NULL check cleanup"
>for additional details.
>
>
>
>

>--- linux-2.6.14-rc4-orig/drivers/media/dvb/bt8xx/dst.c 2005-10-11 22:41:09.000000000 +0200
>+++ linux-2.6.14-rc4/drivers/media/dvb/bt8xx/dst.c 2005-10-13 10:30:01.000000000 +0200
>@@ -1331,9 +1331,7 @@ struct dst_state *dst_attach(struct dst_
> {
> /* check if the ASIC is there */
> if (dst_probe(state) < 0) {
>- if (state)
>- kfree(state);
>-
>+ kfree(state);
> return NULL;
> }
> /* determine settings based on type */
>@@ -1349,9 +1347,7 @@ struct dst_state *dst_attach(struct dst_
> break;
> default:
> dprintk(verbose, DST_ERROR, 1, "unknown DST type. please report to the LinuxTV.org DVB mailinglist.");
>- if (state)
>- kfree(state);
>-
>+ kfree(state);
> return NULL;
> }
>
>
>


Acked-by : Manu Abraham <manu@linuxtv.org>

Thanks,
Manu

-
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: 2005-10-14 20:08    [W:0.056 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site