linux-stable/drivers
Andre Przywara a08b318a15 pwm: sun4i: Propagate errors in .get_state() to the caller
.get_state() can return an error indication now. Make use of it to
propagate an impossible prescaler encoding, should that have sneaked in
somehow.
Also check the return value of clk_get_rate(). That's unlikely to fail,
but we use that in two divide operations down in the code, so let's
avoid a divide-by-zero condition on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20221201152223.3133-1-andre.przywara@arm.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2022-12-06 12:46:30 +01:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base Interrupt subsystem updates: 2022-10-12 10:23:24 -07:00
bcma Interrupt subsystem updates: 2022-10-12 10:23:24 -07:00
block Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
bluetooth
bus
cdrom
char prandom: remove unused functions 2022-10-11 17:42:58 -06:00
clk This is the final part of the clk patches for this merge window. 2022-10-16 11:08:19 -07:00
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl
dax libnvdimm for 6.1 2022-10-14 18:41:41 -07:00
dca
devfreq
dio
dma treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
dma-buf
edac Merge patch series "Use composable cache instead of L2 cache" 2022-10-13 11:07:13 -07:00
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
gpu drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller 2022-12-06 12:46:23 +01:00
greybus
hid
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c
i3c i3c: master: Remove the wrong place of reattach. 2022-10-12 23:45:29 +02:00
idle
iio
infiniband treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
input
interconnect
iommu
ipack
irqchip Interrupt subsystem updates: 2022-10-12 10:23:24 -07:00
isdn
leds leds: qcom-lpg: Propagate errors in .get_state() to the caller 2022-12-06 12:46:24 +01:00
macintosh
mailbox
mcb
md treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
media treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
memory
memstick
message
mfd
misc treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
mmc Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
most
mtd Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
mux
net Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
nfc
ntb
nubus
nvdimm libnvdimm for 6.1 2022-10-14 18:41:41 -07:00
nvme Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
nvmem
of
opp
parisc parisc architecture fixes and updates for kernel v6.1-rc1: 2022-10-14 12:10:01 -07:00
parport
pci pci-v6.1-fixes-1 2022-10-15 16:36:38 -07:00
pcmcia
peci
perf arm64 fixes: 2022-10-14 12:38:03 -07:00
phy pci-v6.1-changes 2022-10-11 11:08:18 -07:00
pinctrl Interrupt subsystem updates: 2022-10-12 10:23:24 -07:00
platform LoongArch changes for v6.1 2022-10-12 10:35:20 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm pwm: sun4i: Propagate errors in .get_state() to the caller 2022-12-06 12:46:30 +01:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc RTC for 6.1 2022-10-14 18:36:42 -07:00
s390 s390 updates for the 6.1 merge window #2 2022-10-14 11:36:05 -07:00
sbus
scsi treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
sh
siox
slimbus
soc Merge patch series "Use composable cache instead of L2 cache" 2022-10-13 11:07:13 -07:00
soundwire
spi
spmi
ssb
staging
target treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
tc
tee
thermal
thunderbolt treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
tty parisc architecture fixes and updates for kernel v6.1-rc1: 2022-10-14 12:10:01 -07:00
ufs
uio
usb
vdpa
vfio VFIO updates for v6.1-rc1 2022-10-12 14:46:48 -07:00
vhost
video Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
virt
virtio virtio_pci: use irq to detect interrupt support 2022-10-13 09:33:03 -04:00
vlynq
w1
watchdog linux-watchdog 6.1-rc1 tag 2022-10-13 10:31:13 -07:00
xen xen: branch for v6.1-rc1 2022-10-12 14:39:38 -07:00
zorro
Kconfig
Makefile