From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Richard Purdie" <rpurdie@openedhand.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"David Woodhouse" <dwmw2@infradead.org>,
herbert@gondor.apana.org.au,
linux-mtd <linux-mtd@lists.infradead.org>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH 5/5] crypto: Add LZO compression support to the crypto interface
Date: Fri, 4 May 2007 13:39:20 +0530 [thread overview]
Message-ID: <a781481a0705040109r45cbf472i4094dd2ebf7841e8@mail.gmail.com> (raw)
In-Reply-To: <1178030843.5883.57.camel@localhost.localdomain>
On 5/1/07, Richard Purdie <rpurdie@openedhand.com> wrote:
> +static int lzo_init(struct crypto_tfm *tfm)
> +{
> + struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
> +
> + ctx->lzo_mem = vmalloc(LZO1X_MEM_COMPRESS);
> +
> + if (!ctx->lzo_mem) {
> + vfree(ctx->lzo_mem);
Heh. What's (why's) this? You _can_ {k, v}free NULL but doing so after
explicitly checking for it is ... ... insane!
> + return -ENOMEM;
Yeah. Just return -ENOMEM; and be done with it.
next prev parent reply other threads:[~2007-05-04 8:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 14:47 Richard Purdie
2007-05-04 8:09 ` Satyam Sharma [this message]
2007-05-04 8:39 ` Richard Purdie
2007-05-04 11:31 Richard Purdie
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=a781481a0705040109r45cbf472i4094dd2ebf7841e8@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=dwmw2@infradead.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rpurdie@openedhand.com \
/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®