Re: [PATCH] scsi: sr: add handling of memory allocation failure in get_capabilities

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

 



Enze,

> @@ -669,8 +669,9 @@ static int sr_probe(struct device *dev)
>  
>  	sdev->sector_size = 2048;	/* A guess, just in case */
>  
> -	/* FIXME: need to handle a get_capabilities failure properly ?? */
> -	get_capabilities(cd);
> +	error = -ENOMEM;
> +	if (get_capabilities(cd))
> +		goto fail_put;

Shouldn't this be 'goto fail_minor;'?

-- 
Martin K. Petersen	Oracle Linux Engineering



[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