* [PATCH] net: hisilicon: fix ptr_ret.cocci warnings [not found] <201510201454.XwPbNrDe%fengguang.wu@intel.com> @ 2015-10-20 6:56 ` kbuild test robot 2015-10-22 2:38 ` David Miller 0 siblings, 1 reply; 2+ messages in thread From: kbuild test robot @ 2015-10-20 6:56 UTC (permalink / raw) To: Arnd Bergmann Cc: kbuild-all, netdev, huangdaode, Kenneth Lee, Yisen Zhuang, linux-kernel drivers/net/ethernet/hisilicon/hns/hnae.c:442:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- hnae.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns/hnae.c +++ b/drivers/net/ethernet/hisilicon/hns/hnae.c @@ -439,10 +439,7 @@ EXPORT_SYMBOL(hnae_ae_unregister); static int __init hnae_init(void) { hnae_class = class_create(THIS_MODULE, "hnae"); - if (IS_ERR(hnae_class)) - return PTR_ERR(hnae_class); - - return 0; + return PTR_ERR_OR_ZERO(hnae_class); } static void __exit hnae_exit(void) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: hisilicon: fix ptr_ret.cocci warnings 2015-10-20 6:56 ` [PATCH] net: hisilicon: fix ptr_ret.cocci warnings kbuild test robot @ 2015-10-22 2:38 ` David Miller 0 siblings, 0 replies; 2+ messages in thread From: David Miller @ 2015-10-22 2:38 UTC (permalink / raw) To: fengguang.wu Cc: arnd, kbuild-all, netdev, huangdaode, liguozhu, Yisen.Zhuang, linux-kernel From: kbuild test robot <fengguang.wu@intel.com> Date: Tue, 20 Oct 2015 14:56:00 +0800 > drivers/net/ethernet/hisilicon/hns/hnae.c:442:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > CC: Arnd Bergmann <arnd@arndb.de> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Applied to net-next, thanks. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-22 2:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201510201454.XwPbNrDe%fengguang.wu@intel.com>
2015-10-20 6:56 ` [PATCH] net: hisilicon: fix ptr_ret.cocci warnings kbuild test robot
2015-10-22 2:38 ` David Miller
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®