linux_dsm_epyc7002/drivers/char/tpm
Kylene Jo Hall e2a8f7a129 [PATCH] tpm: Fix lack of driver_unregister in init failcases
driver_unregister is not being properly called when the init function
returns an error case.  Restructured the return logic such that this and
the other cleanups all happen in one place.  Preformed many of the cleanups
that Andrew Morton's patch on Thursday made in tpm_atmel.c.  Fixed
Matthieu's concern about writing before discovery.

(akpm: rmk said:

This driver is buggy.  You must not provide your own release function - it
doesn't solve the problem which the warning (which you get when you don't
provide one) is telling you about.

You should convert your device driver over to the replacement dynamic platform
support, once it is merged.  IOW, something like:

	pdev = platform_device_alloc("mydev", id);
	if (pdev) {
		err = platform_device_add_resources(pdev, &resources,
						ARRAY_SIZE(resources));
		if (err == 0)
			err = platform_device_add_data(pdev, &platform_data,
						sizeof(platform_data));
		if (err == 0)
			err = platform_device_add(pdev);
		} else {
			err = -ENOMEM;
		}
		if (err)
			platform_device_put(pdev);
)

Signed-off-by: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:36 -08:00
..
Kconfig [ACPI] delete CONFIG_ACPI_BUS 2005-08-24 12:11:34 -04:00
Makefile [PATCH] tpm: Support for Infineon TPM 2005-07-27 16:26:06 -07:00
tpm_atmel.c [PATCH] TPM compile fix 2005-11-01 21:44:45 -08:00
tpm_infineon.c [PATCH] tpm-tidies 2005-10-30 17:37:29 -08:00
tpm_nsc.c [PATCH] tpm: Fix lack of driver_unregister in init failcases 2005-11-07 07:53:36 -08:00
tpm.c [PATCH] tpm-tidies 2005-10-30 17:37:29 -08:00
tpm.h [PATCH] missing platform_device.h includes 2005-11-01 21:50:01 -08:00