> - int rc; > + int rc = -1; Instead of relying on -1 or memcmp return values in rc I'd suggest to use found_dev; *found_dev = NULL; ... if (!memcmp(&tmp_dev_wwn[0], dev_wwn, XCOPY_NAA_IEEE_REGEX_LEN)) { *found_dev = se_dev; target_get_device(se_dev); break; } ... Otherwise this looks fine to me: Reviewed-by: Christoph Hellwig <hch@xxxxxx> -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html