]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: pxa2xx: Wrap pxa_ssp_request() to be device managed resource
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 May 2024 15:09:57 +0000 (18:09 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 3 Jun 2024 14:59:55 +0000 (15:59 +0100)
commita2fca8f2e242b3cdfed2a15084e733348ef68509
treec26f1e92b8ccd0d4f1a041fa91c58f6935e194cb
parent22aaae482044b8bfa11f2c2d5725f4cd1b3064f9
spi: pxa2xx: Wrap pxa_ssp_request() to be device managed resource

In the error path or remove path the reference counter in PXA SSP driver
may be dropped before the other resources, that were allocated after
bumbing the reference counter. This breaks reversed order of freeing and
might have an undesired side effects. Prevent this from happening by
wrapping pxa_ssp_request() to be device managed resource.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240530151117.1130792-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c