All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Subject: Re: self-assignment in dino_card_setup
Date: Tue, 29 Dec 2015 21:22:35 +0100	[thread overview]
Message-ID: <5682EB8B.30308@gmx.de> (raw)
In-Reply-To: <87k2nx3tuz.fsf@rasmusvillemoes.dk>

Hi Rasmus,

On 29.12.2015 21:03, Rasmus Villemoes wrote:
> Line 474 of drivers/parisc/dino.c reads
> 
>         res->name = dino_dev->hba.lmmio_space.name;
> 
> but res is &dino_dev->hba.lmmio_space, so this seems to just assign NULL
> again to res->name. Presumably the allocation of <= 128 bytes never
> fails, but I wonder what the purpose was, and if the confusing else
> branch couldn't just be deleted (and then one should just do res->name =
> kmemdup(name, size+1, GFP_KERNEL); and delete the if as well).

I'd suggest to just delete the else branch.
Do you want to send a patch with signed-off ?

Helge


  reply	other threads:[~2015-12-29 20:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 20:03 self-assignment in dino_card_setup Rasmus Villemoes
2015-12-29 20:22 ` Helge Deller [this message]
2015-12-29 20:51   ` James Bottomley

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=5682EB8B.30308@gmx.de \
    --to=deller@gmx.de \
    --cc=jejb@parisc-linux.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.