diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-19 22:17:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-19 22:17:30 -0400 |
commit | 7cd9c9bb57476167e83b7780dbc06d1dd601789d (patch) | |
tree | afcf43a6d5e4661306676ebcd08224906170b578 /lib | |
parent | 591bfc6bf9e5e25e464fd4c87d64afd5135667c4 (diff) |
Revert "driver core: check start node in klist_iter_init_node"
This reverts commit a15d49fd3094cff90e5410ca454a870e0a722fe1 as that
patch broke the build.
Cc: Hannes Reinecke <hare@suse.de>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/klist.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/klist.c b/lib/klist.c index a2741a7d9784..0874e41609a6 100644 --- a/lib/klist.c +++ b/lib/klist.c | |||
@@ -278,19 +278,13 @@ EXPORT_SYMBOL_GPL(klist_node_attached); | |||
278 | * Similar to klist_iter_init(), but starts the action off with @n, | 278 | * Similar to klist_iter_init(), but starts the action off with @n, |
279 | * instead of with the list head. | 279 | * instead of with the list head. |
280 | */ | 280 | */ |
281 | int klist_iter_init_node(struct klist *k, struct klist_iter *i, | 281 | void klist_iter_init_node(struct klist *k, struct klist_iter *i, |
282 | struct klist_node *n) | 282 | struct klist_node *n) |
283 | { | 283 | { |
284 | if (n) { | ||
285 | kref_get(&n->n_ref); | ||
286 | if (!n->n_klist) { | ||
287 | kref_put(&n->n_ref); | ||
288 | return -ENODEV; | ||
289 | } | ||
290 | } | ||
291 | i->i_klist = k; | 284 | i->i_klist = k; |
292 | i->i_cur = n; | 285 | i->i_cur = n; |
293 | return 0; | 286 | if (n) |
287 | kref_get(&n->n_ref); | ||
294 | } | 288 | } |
295 | EXPORT_SYMBOL_GPL(klist_iter_init_node); | 289 | EXPORT_SYMBOL_GPL(klist_iter_init_node); |
296 | 290 | ||