From: Grant Grundler <grundler@parisc-linux.org>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: Matthew Wilcox <matthew@wil.cx>,
Grant Grundler <grundler@parisc-linux.org>,
parisc-linux@parisc-linux.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parisc: kfree cleanup in arch/parisc/
Date: Tue, 12 Apr 2005 13:22:29 -0600 [thread overview]
Message-ID: <20050412192229.GA2743@colo.lackof.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0504112249510.2480@dragon.hyggekrogen.localhost>
On Mon, Apr 11, 2005 at 10:54:25PM +0200, Jesper Juhl wrote:
> Get rid of redundant NULL pointer checks before kfree() in arch/parisc/ as
> well as a few blank lines.
>
> Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
thanks!
Commited to cvs.parisc-linux.org:
http://lists.parisc-linux.org/pipermail/parisc-linux-cvs/2005-April/035542.html
I expect Matthew Wilcox will submit to linus with other parisc code changes
in the next RC release.
thanks,
grant
>
> diff -upr linux-2.6.12-rc2-mm3-orig/arch/parisc/kernel/ioctl32.c linux-2.6.12-rc2-mm3/arch/parisc/kernel/ioctl32.c
> --- linux-2.6.12-rc2-mm3-orig/arch/parisc/kernel/ioctl32.c 2005-04-05 21:21:08.000000000 +0200
> +++ linux-2.6.12-rc2-mm3/arch/parisc/kernel/ioctl32.c 2005-04-11 22:48:03.000000000 +0200
> @@ -104,12 +104,9 @@ static int drm32_version(unsigned int fd
> }
>
> out:
> - if (kversion.name)
> - kfree(kversion.name);
> - if (kversion.date)
> - kfree(kversion.date);
> - if (kversion.desc)
> - kfree(kversion.desc);
> + kfree(kversion.name);
> + kfree(kversion.date);
> + kfree(kversion.desc);
> return ret;
> }
>
> @@ -166,9 +163,7 @@ static int drm32_getsetunique(unsigned i
> ret = -EFAULT;
> }
>
> - if (karg.unique != NULL)
> - kfree(karg.unique);
> -
> + kfree(karg.unique);
> return ret;
> }
>
> @@ -265,7 +260,6 @@ static int drm32_info_bufs(unsigned int
> }
>
> kfree(karg.list);
> -
> return ret;
> }
>
> @@ -305,7 +299,6 @@ static int drm32_free_bufs(unsigned int
>
> out:
> kfree(karg.list);
> -
> return ret;
> }
>
> @@ -494,15 +487,10 @@ static int drm32_dma(unsigned int fd, un
> }
>
> out:
> - if (karg.send_indices)
> - kfree(karg.send_indices);
> - if (karg.send_sizes)
> - kfree(karg.send_sizes);
> - if (karg.request_indices)
> - kfree(karg.request_indices);
> - if (karg.request_sizes)
> - kfree(karg.request_sizes);
> -
> + kfree(karg.send_indices);
> + kfree(karg.send_sizes);
> + kfree(karg.request_indices);
> + kfree(karg.request_sizes);
> return ret;
> }
>
> @@ -555,9 +543,7 @@ static int drm32_res_ctx(unsigned int fd
> ret = -EFAULT;
> }
>
> - if (karg.contexts)
> - kfree(karg.contexts);
> -
> + kfree(karg.contexts);
> return ret;
> }
>
>
>
>
>
> PS. If you reply to lists other than Linux-kernel, then please keep me on CC:
>
>
prev parent reply other threads:[~2005-04-12 20:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-11 20:54 Jesper Juhl
2005-04-12 19:22 ` Grant Grundler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050412192229.GA2743@colo.lackof.org \
--to=grundler@parisc-linux.org \
--cc=juhl-lkml@dif.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=parisc-linux@parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®