Re: [patch] tcm_qla2xxx: checking for NULL instead of IS_ERR()

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

 



On Tue, 2012-03-13 at 20:21 +0300, Dan Carpenter wrote:
> target_fabric_configfs_init() never returns NULLs, only ERR_PTRs.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index dcbcedc..08cf507 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -1885,9 +1885,9 @@ static int tcm_qla2xxx_register_configfs(void)
>  	 * Register the top level struct config_item_type for NPIV with TCM core
>  	 */
>  	npiv_fabric = target_fabric_configfs_init(THIS_MODULE, "qla2xxx_npiv");
> -	if (!npiv_fabric) {
> +	if (IS_ERR(npiv_fabric)) {
>  		pr_err("target_fabric_configfs_init() failed\n");
> -		ret = -ENOMEM;
> +		ret = PTR_ERR(npiv_fabric);
>  		goto out_fabric;
>  	}
>  	/*

Doh, missed this fix for the qla2xxx_npiv fabric_ops allocation..
Applied to lio-core and will get fixed up for-next-merge.

Thanks Dan!

--nab

--
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