linux-stable/drivers
Christoph Niedermaier 57f34589e9 serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock
commit 7c45eaa813 upstream.

There are register accesses in the function imx_uart_rs485_config(). The
clock must be enabled for these accesses. This was ensured by calling it
via the function uart_rs485_config() in the probe() function within the
range where the clock is enabled. With the commit 7c7f9bc986 ("serial:
Deassert Transmit Enable on probe in driver-specific way") it was removed
from the probe() function and is now only called through the function
uart_add_one_port() which is located at the end of the probe() function.
But the clock is already switched off in this area. To ensure that the
clock is enabled during register access, move the disabling of the clock
to the very end of the probe() function. To avoid leaking enabled clocks
on error also add an error path for exiting with disabling the clock.

Fixes: 7c7f9bc986 ("serial: Deassert Transmit Enable on probe in driver-specific way")
Cc: stable <stable@kernel.org>
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/20231226113647.39376-1-cniedermaier@dh-electronics.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 14:37:52 -08:00
..
accessibility
acpi ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error 2024-01-25 14:37:41 -08:00
amba
android binder: fix race between mmput() and do_exit() 2024-01-25 14:37:51 -08:00
ata ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-08 08:46:08 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 15:44:28 +01:00
auxdisplay
base devcoredump: Send uevent once devcd is ready 2023-12-13 18:27:07 +01:00
bcma
block
bluetooth Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 14:37:46 -08:00
bus bus: ti-sysc: Flush posted write only after srst_udelay 2024-01-05 15:12:28 +01:00
cdrom
char
clk clk: fixed-rate: add devm_clk_hw_register_fixed_rate 2024-01-25 14:37:49 -08:00
clocksource
connector
counter
cpufreq cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() 2024-01-25 14:37:40 -08:00
cpuidle
crypto virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2024-01-25 14:37:50 -08:00
dax
dca
devfreq
dio
dma dmaengine: stm32-mdma: correct desc prep when channel running 2023-11-28 16:54:58 +00:00
dma-buf
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 14:37:39 -08:00
eisa
extcon
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-15 18:48:06 +01:00
firmware firmware: meson_sm: populate platform devices from sm device tree data 2024-01-25 14:37:44 -08:00
fpga
fsi
gnss
gpio gpiolib: sysfs: Fix error handling on failed export 2023-12-13 18:27:04 +01:00
gpu gpu/drm/radeon: fix two memleaks in radeon_vm_init 2024-01-25 14:37:48 -08:00
greybus
hid HID: hid-asus: add const to read-only outgoing usb buffer 2023-12-20 15:44:36 +01:00
hsi
hv
hwmon hwmon: (acpi_power_meter) Fix 4.29 MW bug 2023-12-13 18:27:01 +01:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-25 14:37:39 -08:00
i2c i2c: rk3x: fix potential spinlock recursion on poll 2024-01-25 14:37:38 -08:00
i3c i3c: master: cdns: Fix reading status register 2023-11-28 16:54:58 +00:00
ide
idle
iio iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma() 2024-01-05 15:12:26 +01:00
infiniband IB/iser: Prevent invalidating wrong MR 2024-01-25 14:37:50 -08:00
input Input: atkbd - use ab83 as id when skipping the getid command 2024-01-25 14:37:50 -08:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:12:26 +01:00
iommu iommu/vt-d: Add MTL to quirk list to skip TE disabling 2023-12-08 08:46:12 +01:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 16:54:58 +00:00
md dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata() 2024-01-05 15:12:31 +01:00
media media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe() 2024-01-25 14:37:48 -08:00
memory
memstick
message
mfd
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:27:03 +01:00
mmc mmc: sdhci_omap: Fix TI SoC dependencies 2024-01-25 14:37:50 -08:00
most
mtd mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:37:41 -08:00
mux
net xen-netback: don't produce zero-size SKB frags 2024-01-25 14:37:51 -08:00
nfc
ntb
nubus
nvdimm
nvme nvme: introduce helper function to get ctrl state 2024-01-25 14:37:37 -08:00
nvmem
of of: unittest: Fix of_count_phandle_with_args() expected value message 2024-01-25 14:37:50 -08:00
opp
oprofile
parisc
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-25 14:37:39 -08:00
pci PCI: Add ACS quirk for more Zhaoxin Root Ports 2024-01-25 14:37:39 -08:00
pcmcia
perf
phy
pinctrl pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:37:35 -08:00
platform platform/x86: intel_telemetry: Fix kernel doc descriptions 2023-12-20 15:44:33 +01:00
pnp
power
powercap
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 16:54:54 +00:00
pwm pwm: stm32: Fix enable count for clk in .probe() 2024-01-25 14:37:49 -08:00
rapidio
ras
regulator
remoteproc
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-25 14:37:37 -08:00
rpmsg
rtc
s390 s390/scm: fix virtual vs physical address confusion 2024-01-25 14:37:38 -08:00
sbus
scsi scsi: hisi_sas: Replace with standard error code return value 2024-01-25 14:37:44 -08:00
sfi
sh
siox
slimbus
soc
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:44:36 +01:00
spi spi: sh-msiof: Enforce fixed DTDL for R-Car H3 2024-01-25 14:37:41 -08:00
spmi
ssb
staging media: rkisp1: Disable runtime PM in probe error path 2024-01-25 14:37:48 -08:00
target
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:27:00 +01:00
thermal
thunderbolt
tty serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock 2024-01-25 14:37:52 -08:00
uio uio: Fix use-after-free in uio_open 2024-01-25 14:37:38 -08:00
usb usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 14:37:52 -08:00
vdpa
vfio
vhost
video fbdev: stifb: Make the STI next font pointer a 32-bit signed offset 2023-12-08 08:46:14 +01:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused 2024-01-25 14:37:49 -08:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-08 08:46:10 +01:00
zorro
Kconfig
Makefile