All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth: use PTR_RET instead of IS_ERR + PTR_ERR
@ 2013-03-12 18:13 ` Silviu-Mihai Popescu
  0 siblings, 0 replies; 12+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-12 18:13 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: marcel, gustavo, johan.hedberg, davem, netdev, linux-kernel,
	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@gmail.com>
---
 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] 12+ messages in thread

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

Thread overview: 12+ 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-12 18:13 ` Silviu-Mihai Popescu
2013-03-13  9:31 ` David Miller
2013-03-18 18:05   ` Silviu Popescu
2013-03-18 18:05     ` Silviu Popescu
2013-03-18 18:08     ` David Miller
2013-03-18 18:08       ` David Miller
2013-03-18 18:13     ` Joe Perches
2013-03-18 18:13       ` Joe Perches
2013-03-18 18:13     ` Silviu Popescu
2013-03-18 18:19       ` Gustavo Padovan
2013-03-18 18:19         ` Gustavo Padovan

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.