Re: [PATCH 03/15] target: Make all control CDBs scatter-gather

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

 



> @@ -209,6 +216,7 @@ int core_emulate_set_target_port_groups(struct se_cmd *cmd)
>  			 * REQUEST, and the additional sense code set to INVALID
>  			 * FIELD IN PARAMETER LIST.
>  			 */
> +			transport_kunmap_first_data_page(cmd);
>  			return PYX_TRANSPORT_INVALID_PARAMETER_LIST;
>  		}
>  		rc = -1;
> @@ -260,8 +268,10 @@ int core_emulate_set_target_port_groups(struct se_cmd *cmd)
>  			 * If not matching target port group ID can be located
>  			 * throw an exception with ASCQ: INVALID_PARAMETER_LIST
>  			 */
> -			if (rc != 0)
> +			if (rc != 0) {
> +				transport_kunmap_first_data_page(cmd);
>  				return PYX_TRANSPORT_INVALID_PARAMETER_LIST;
> +			}

It would be good to use goto unwinding here and in all other control
CDB handlers that may return errors.

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