Re: [PATCH] s390/pci: Remove unnecessary if condition

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

 



On Fri, 29 Jul 2016, Amitoj Kaur Chawla wrote:
> Remove unnecessary error handling because the only failure value that
> can be returned is NULL and so the test can never be true.
> 
> The Coccinelle semantic patch used to make this change is as follows:
> @@
> expression e;
> @@
> 
>   e = debugfs_create_file(...);
> - if(IS_ERR(e)) { e = NULL; }

Nope. For !CONFIG_DEBUG_FS debugfs_create_file returns an ERR_PTR.

Regards,
Sebastian

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux