On Tue, Dec 30, 2008 at 10:40:04AM -0500, Tony Battersby wrote: > sdp = sg_get_dev(dev); > if ((!sdp) || (!sdp->device)) { > + sg_put_dev(sdp); > unlock_kernel(); > return -ENXIO; > } > if (sdp->detached) { > + sg_put_dev(sdp); > unlock_kernel(); > return -ENODEV; > } It would be useful if you converted this to the standard goto-based unwinding with a few labels at the end of the function: out_put: sg_put_dev(sdp); out_unlock: unlock_kernel(); out: return error; -- 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