netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR
@ 2013-03-12 18:13 Silviu-Mihai Popescu
  2013-03-13  9:31 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-12 18:13 UTC (permalink / raw)
  To: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA
  Cc: marcel-kz+m5ild9QBg9hUCZPvPmw, gustavo-THi1TnShQwVAfugRpC6u6w,
	johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Silviu-Mihai Popescu

This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
readability.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 net/bluetooth/hci_sysfs.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 23b4e24..6fb5065 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -590,10 +590,7 @@ int __init bt_sysfs_init(void)
 	bt_debugfs = debugfs_create_dir("bluetooth", NULL);
 
 	bt_class = class_create(THIS_MODULE, "bluetooth");
-	if (IS_ERR(bt_class))
-		return PTR_ERR(bt_class);
-
-	return 0;
+	return PTR_RET(bt_class)
 }
 
 void bt_sysfs_cleanup(void)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-18 18:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 18:13 [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu
2013-03-13  9:31 ` David Miller
     [not found]   ` <20130313.053145.2200448840921851390.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-03-18 18:05     ` Silviu Popescu
     [not found]       ` <CAPWTe+JzznuWYKksAfxkD=u9kv8DuAF4v2AWVxd2OUeDtCYKBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-18 18:08         ` David Miller
2013-03-18 18:13         ` Joe Perches
2013-03-18 18:13       ` Silviu Popescu
     [not found]         ` <CAPWTe+Kfr=zD6oJsfX3W8Ze1iH+CoEHx5FXo4YaVtQuMHD5k_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-18 18:19           ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).