From: Jesper Juhl <jesper.juhl@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] no more need to check for NULL before calls to crypto_free_tfm
Date: Tue, 19 Jul 2005 02:12:09 +0200 [thread overview]
Message-ID: <9a874849050718171262ede630@mail.gmail.com> (raw)
In-Reply-To: <20050718153055.GA14719@gondor.apana.org.au>
On 7/18/05, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Sun, Jul 17, 2005 at 12:32:27AM +0200, Jesper Juhl wrote:
> >
> > --- linux-2.6.13-rc3-orig/drivers/block/cryptoloop.c 2005-06-17 21:48:29.000000000 +0200
> > +++ linux-2.6.13-rc3/drivers/block/cryptoloop.c 2005-07-16 23:35:55.000000000 +0200
> > @@ -227,14 +227,14 @@ cryptoloop_ioctl(struct loop_device *lo,
> > static int
> > cryptoloop_release(struct loop_device *lo)
> > {
> > - struct crypto_tfm *tfm = (struct crypto_tfm *) lo->key_data;
> > - if (tfm != NULL) {
> > - crypto_free_tfm(tfm);
> > - lo->key_data = NULL;
> > - return 0;
> > + struct crypto_tfm *tfm = lo->key_data;
> > + if (!tfm) {
> > + printk(KERN_ERR "cryptoloop_release(): tfm == NULL?\n");
> > + return -EINVAL;
> > }
> > - printk(KERN_ERR "cryptoloop_release(): tfm == NULL?\n");
> > - return -EINVAL;
> > + crypto_free_tfm(tfm);
> > + lo->key_data = NULL;
> > + return 0;
> > }
>
> This change looks rather pointless.
>
Hmm, I guess you're right. Dunno why I reordered that, but you are
right, it's pretty pointless. Except for getting rid of the cast, that
makes sense, it's superfluous so it should go away...
> The rest of the patch looks good.
>
> Thanks,
You're welcome. Thank you for reviewing it.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
prev parent reply other threads:[~2005-07-19 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200507170032.28174.jesper.juhl@gmail.com>
2005-07-18 15:30 ` [PATCH] no more need to check for NULL before calls to crypto_free_tfm Herbert Xu
2005-07-19 0:12 ` Jesper Juhl [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=9a874849050718171262ede630@mail.gmail.com \
--to=jesper.juhl@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.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