linux/drivers
Hans de Goede 958905ed42 media: ov2680: Fix ov2680_bayer_order()
[ Upstream commit 50a7bad4e0 ]

The index into ov2680_hv_flip_bayer_order[] should be 0-3, but
ov2680_bayer_order() was using 0 + BIT(2) + (BIT(2) << 1) as
max index, while the intention was to use: 0 + 1 + 2 as max index.

Fix the index calculation in ov2680_bayer_order(), while at it
also just use the ctrl values rather then reading them back using
a slow i2c-read transaction.

This also allows making the function void, since there now are
no more i2c-reads to error check.

Note the check for the ctrls being NULL is there to allow
adding an ov2680_fill_format() helper later, which will call
ov2680_set_bayer_order() during probe() before the ctrls are created.

[Sakari Ailus: Change all users of ov2680_set_bayer_order() here]

Fixes: 3ee47cad3e ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:22:47 +02:00
..
accessibility
acpi ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table 2023-09-19 12:22:31 +02:00
amba
android binder: fix memory leak in binder_init() 2023-08-16 18:21:59 +02:00
ata ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() 2023-09-19 12:22:28 +02:00
atm
auxdisplay
base driver core: test_async: fix an error code 2023-09-19 12:22:45 +02:00
bcma
block rbd: prevent busy loop when requesting exclusive lock 2023-08-11 15:13:57 +02:00
bluetooth Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave() 2023-09-19 12:22:34 +02:00
bus bus: ti-sysc: Fix cast to enum warning 2023-09-19 12:22:39 +02:00
cdrom
char ipmi:ssif: Fix a memory leak when scanning for an adapter 2023-09-19 12:22:40 +02:00
clk clk: imx: composite-8m: fix clock pauses when set_rate would be a no-op 2023-09-19 12:22:41 +02:00
clocksource clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe 2023-07-23 13:46:45 +02:00
comedi
connector
counter counter: 104-quad-8: Fix race condition between FLAG and CNTR reads 2023-04-26 13:51:55 +02:00
cpufreq cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() 2023-09-19 12:22:32 +02:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:22:42 +02:00
crypto crypto: caam - fix unchecked return value error 2023-09-19 12:22:33 +02:00
cxl
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca
devfreq
dio
dma idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM 2023-09-19 12:22:29 +02:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:18:21 +02:00
edac EDAC/igen6: Fix the issue of no error events 2023-09-19 12:22:40 +02:00
eisa
extcon extcon: usbc-tusb320: Convert to i2c's .probe_new() 2023-07-23 13:47:31 +02:00
firewire firewire: net: fix use after free in fwnet_finish_incoming_packet() 2023-08-26 14:23:24 +02:00
firmware firmware: meson_sm: fix to avoid potential NULL pointer dereference 2023-09-19 12:22:39 +02:00
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-11 23:00:31 +09:00
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss
gpio gpio: mvebu: fix irq domain leak 2023-08-03 10:22:26 +02:00
gpu drm/radeon: Use RMW accessors for changing LNKCTL 2023-09-19 12:22:42 +02:00
greybus
hid HID: wacom: remove the battery when the EKR is off 2023-09-06 21:28:38 +01:00
hsi
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:29:42 +02:00
hwmon hwmon: (tmp513) Fix the channel number in tmp51x_is_visible() 2023-09-19 12:22:35 +02:00
hwspinlock
hwtracing coresight: tmc: Explicit type conversions to prevent integer overflow 2023-09-19 12:22:45 +02:00
i2c i2c: designware: Handle invalid SMBus block data response length value 2023-08-26 14:23:32 +02:00
i3c
idle
iio iio: addac: stx104: Fix race condition when converting analog-to-digital 2023-08-26 14:23:27 +02:00
infiniband IB/uverbs: Fix an potential error pointer dereference 2023-09-19 12:22:46 +02:00
input Input: adxl34x - do not hardcode interrupt trigger type 2023-07-23 13:46:59 +02:00
interconnect
iommu iommu/vt-d: Fix to flush cache of PASID directory table 2023-09-19 12:22:46 +02:00
ipack
irqchip irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation 2023-08-03 10:22:45 +02:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:22:01 +02:00
leds leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename 2023-07-23 13:47:36 +02:00
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-11 23:00:34 +09:00
mailbox mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 2023-07-23 13:47:28 +02:00
mcb mcb-pci: Reallocate memory region to avoid memory overlapping 2023-05-24 17:36:47 +01:00
md md: raid0: account for split bio in iostat accounting 2023-09-19 12:22:40 +02:00
media media: ov2680: Fix ov2680_bayer_order() 2023-09-19 12:22:47 +02:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-23 13:47:03 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-23 13:46:52 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-24 17:36:45 +01:00
mfd mfd: pm8008: Fix module autoloading 2023-07-23 13:47:51 +02:00
misc misc: rtsx: judge ASPM Mode to set PETXCFG Reg 2023-08-16 18:21:59 +02:00
mmc mmc: au1xmmc: force non-modular build and remove symbol_get usage 2023-09-06 21:28:37 +01:00
most
mtd mtd: rawnand: fsl_upm: Fix an off-by one test in fun_exec_op() 2023-08-11 15:13:59 +02:00
mux
net wifi: ath10k: Use RMW accessors for changing LNKCTL 2023-09-19 12:22:42 +02:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:29:51 +02:00
ntb NTB: ntb_tool: Add check for devm_kcalloc 2023-07-23 13:47:42 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:25:05 +01:00
nvdimm
nvme nvme-rdma: fix potential unbalanced freeze & unfreeze 2023-08-16 18:22:03 +02:00
nvmem nvmem: rmem: Use NVMEM_DEVID_AUTO 2023-07-23 13:47:25 +02:00
of of: unittest: Fix overlay type in apply/revert check 2023-09-19 12:22:40 +02:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:22:31 +02:00
parisc parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-24 17:36:48 +01:00
parport
pci PCI: layerscape: Add workaround for lost link capabilities during reset 2023-09-19 12:22:42 +02:00
pcmcia pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-08-26 14:23:24 +02:00
perf perf/imx_ddr: don't enable counter0 if none of 4 counters are used 2023-09-19 12:22:31 +02:00
phy phy: qcom-snps-femto-v2: use qcom_snps_hsphy_suspend/resume error code 2023-09-19 12:22:26 +02:00
pinctrl pinctrl: mcp23s08: check return value of devm_kasprintf() 2023-09-19 12:22:41 +02:00
platform platform/x86: dell-sysman: Fix reference leak 2023-09-19 12:22:46 +02:00
pnp
power power: supply: Fix logic checking if system is running from battery 2023-06-21 15:59:13 +02:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-23 13:46:46 +02:00
pps
ps3
ptp ptp_qoriq: fix memory leak in probe() 2023-04-05 11:24:55 +02:00
pwm pwm: meson: fix handling of period/duty if greater than UINT_MAX 2023-08-03 10:22:30 +02:00
rapidio
ras
regulator regulator: core: Streamline debugfs operations 2023-07-23 13:46:50 +02:00
remoteproc remoteproc: stm32_rproc: Add mutex protection for workqueue 2023-05-24 17:36:44 +01:00
reset
rpmsg
rtc rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff 2023-09-06 21:28:37 +01:00
s390 s390/pkey: fix/harmonize internal keyblob headers 2023-09-19 12:22:31 +02:00
sbus
scsi scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly 2023-09-19 12:22:45 +02:00
sh
siox
slimbus
soc soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros 2023-09-19 12:22:35 +02:00
soundwire soundwire: fix enumeration completion 2023-08-11 15:14:00 +02:00
spi spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe() 2023-09-19 12:22:32 +02:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-11 23:00:34 +09:00
ssb
staging media: rkvdec: increase max supported height for H.264 2023-09-19 12:22:44 +02:00
target scsi: target: iscsi: Prevent login threads from racing between each other 2023-06-28 10:29:50 +02:00
tc
tee tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' 2023-06-14 11:13:06 +02:00
thermal thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe() 2023-07-23 13:46:46 +02:00
thunderbolt thunderbolt: Read retimer NVM authentication status prior tb_retimer_set_inbound_sbtx() 2023-08-26 14:23:24 +02:00
tty serial: sprd: Fix DMA buffer leak issue 2023-09-19 12:22:45 +02:00
uio
usb USB: gadget: f_mass_storage: Fix unused variable warning 2023-09-19 12:22:46 +02:00
vdpa vduse: Use proper spinlock for IRQ injection 2023-08-26 14:23:30 +02:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:22:41 +02:00
vhost vhost_net: revert upend_idx only on retriable error 2023-06-28 10:29:53 +02:00
video fbdev: fix potential OOB read in fast_imageblit() 2023-08-30 16:18:12 +02:00
virt
virtio virtio-mmio: don't break lifecycle of vm_dev 2023-08-26 14:23:30 +02:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub) 2023-08-26 14:23:25 +02:00
xen xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 13:55:32 +01:00
zorro
Kconfig
Makefile