Re: [PATCH v2] scsi: core: Don't free dev_name() and hold refcount for parent manually

From: Greg KH

Date: Mon Jan 19 2026 - 10:54:21 EST


On Mon, Jan 19, 2026 at 10:23:06PM +0800, Tzung-Bi Shih wrote:
> static void scsi_host_cls_release(struct device *dev)
> {
> - put_device(&class_to_shost(dev)->shost_gendev);
> + /*
> + * Keep an empty release() to prevent device_release() from emitting a
> + * warning.
> + */
> }

Nope, sorry, something is VERY wrong if this is ever the case. The
driver core is warning you for a very good reason, don't attempt to work
around that at all, the message was placed there to help you, not for
you to ignore.

thanks,

greg k-h