Re: self-assignment in dino_card_setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux