On Mon, Mar 25, 2024 at 04:38:43PM +0900, Damien Le Moal wrote: > > + if (hostt->device_configure) > > + ret = hostt->device_configure(sdev, &lim); > > + else if (hostt->slave_configure) > > + ret = hostt->slave_configure(sdev); > > + > > + ret2 = queue_limits_commit_update(sdev->request_queue, &lim); > > Why do this if ->device_configure() or ->slave_configure() failed ? > Shouldn't the "if (ret) goto fail" hunk be moved above this call ? queue_limits_commit_update unlocks the limits lock, which we'd otherwise leak. We could have a queue_limits_commit_abort, but it seems a bit pointless. > > + * > > + * Note: slave_configure is the legacy version, use device_configure for > > + * all new code. > > Maybe explictly mention that both *cannot* be defined here ? Will do.