Re: [PATCH v5] PCI/DOE: Expose the DOE protocols via sysfs

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

 



On Fri, Aug 11, 2023 at 08:44:53PM -0400, Alistair Francis wrote:
> +	ret = devm_device_add_group(&pdev->dev, &pci_dev_doe_proto_group);
> +	if (ret) {
> +		pci_err(pdev, "can't create DOE goup: %d\n", ret);
> +		return ret;
> +	}

You cannot use devm_* functions in the PCI core.

Anything done through devm_* will be undone when the device's driver
unbinds.  User space can unbind and rebind the driver at any time
through sysfs.  They'll lose your DOE attributes the first time
they do this because of your use of devm_device_add_group().

Thanks,

Lukas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux