Skip to content

Commit

Permalink
target: Drop bogus ERR_PTR usage in target_fabric_configfs_init
Browse files Browse the repository at this point in the history
In the original code, there were several places inside the
target_fabric_configfs_init() function that returned NULL on error
and one place the returned an ERR_PTR.  There are two places that
call this function and they only check for NULL returns; they don't
check for ERR_PTRs.  So I've changed the ERR_PTR so now the function
only returns NULL on error.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Jun 24, 2011
1 parent 552523d commit 5eff5be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ struct target_fabric_configfs *target_fabric_configfs_init(

tf = kzalloc(sizeof(struct target_fabric_configfs), GFP_KERNEL);
if (!(tf))
return ERR_PTR(-ENOMEM);
return NULL;

INIT_LIST_HEAD(&tf->tf_list);
atomic_set(&tf->tf_access_cnt, 0);
Expand Down

0 comments on commit 5eff5be

Please sign in to comment.