Re: [patch 3/4] SCSI: target: don't return ERR_PTR in target_fabric_configfs_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-06-13 at 23:10 +0300, Dan Carpenter wrote:
> 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@xxxxxxxxx>
> 

Committed as abf2b523bbe.

Thanks!

--nab

> diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
> index ee6fad9..b17abd1 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux