Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
dc7cde1
can: kvaser_usb: leaf: Fix potential infinite loop in command parsers
pip-izony Oct 23, 2025
9d5a431
can: gs_usb: gs_usb_xmit_callback(): fix handling of failed transmitt…
marckleinebudde Nov 8, 2025
f1916b4
can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length befo…
marckleinebudde Nov 8, 2025
d8d36f9
can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length befo…
marckleinebudde Nov 8, 2025
d0bcad6
Bluetooth: hci_sock: Prevent race in socket write iter and sock bind
ea1davis Nov 16, 2025
877f801
Bluetooth: SMP: Fix not generating mackey and ltk when repairing
Vudentz Nov 17, 2025
0621540
net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
dangowrt Nov 20, 2025
354f03a
platform/x86: intel: punit_ipc: fix memory corruption
Nov 21, 2025
f31417b
net: aquantia: Add missing descriptor cache invalidation on ATL2
Nov 20, 2025
26ae124
net: lan966x: Fix the initialization of taprio
HoratiuVultur Nov 21, 2025
91b63ae
net/mlx5e: Fix validation logic in rate limiting
Nov 24, 2025
b575975
net: sxgbe: fix potential NULL dereference in sxgbe_rx()
akodanev Nov 21, 2025
e930a82
drm/amdgpu: fix cyan_skillfish2 gpu info fw handling
alexdeucher Nov 26, 2025
b1996c2
net: dsa: sja1105: simplify static configuration reload
Oct 1, 2024
1f92416
net: dsa: sja1105: fix SGMII linking at 10M or 100M but not passing t…
vladimiroltean Nov 22, 2025
1a8b8e2
net: atlantic: fix fragment overflow handling in RX path
Jiefeng-Zhang Nov 26, 2025
af668e6
net: fec: cancel perout_timer when PEROUT is disabled
Nov 25, 2025
542e674
net: fec: do not update PEROUT if it is enabled
Nov 25, 2025
956fc1d
net: fec: do not allow enabling PPS and PEROUT simultaneously
Nov 25, 2025
0eaa749
net: fec: do not register PPS event for PEROUT
Nov 25, 2025
49cb1c9
iio: st_lsm6dsx: Fixed calibrated timestamp calculation
Oct 15, 2025
f632357
usb: gadget: renesas_usbf: Handle devm_pm_runtime_enable() errors
ISCAS-Vulab Nov 24, 2025
d5beb17
mailbox: mailbox-test: Fix debugfs_create_dir error checking
ISCAS-Vulab Nov 20, 2025
cd19056
mailbox: pcc: Refactor error handling in irq handler into separate fu…
sudeep-holla Mar 13, 2025
8841c88
mailbox: pcc: don't zero error register
Nov 5, 2025
9d8528b
spi: tegra114: remove Kconfig dependency on TEGRA20_APB_DMA
Nov 26, 2025
3ffc25a
spi: amlogic-spifc-a1: Handle devm_pm_runtime_enable() errors
ISCAS-Vulab Nov 24, 2025
9154dea
spi: spi-mem: Allow specifying the byte order in Octal DTR mode
ambarus Sep 26, 2024
814ac17
spi: spi-mem: Extend spi-mem operations with a per-operation maximum …
miquelraynal Dec 24, 2024
27ac1b4
spi: spi-mem: Add a new controller capability
miquelraynal Dec 24, 2024
b82fffb
spi: nxp-fspi: Support per spi-mem operation frequency switches
miquelraynal Dec 24, 2024
133eef1
spi: nxp-fspi: Propagate fwnode in ACPI case as well
andy-shev Nov 26, 2025
707e80d
spi: bcm63xx: fix premature CS deassertion on RX-only transactions
rikka0w0 Nov 16, 2025
2d614db
Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()"
olsajiri Nov 4, 2025
369a453
iio: imu: st_lsm6dsx: fix array size for st_lsm6dsx_settings fields
Oct 17, 2025
4edfe1d
iio:common:ssp_sensors: Fix an error handling path ssp_probe()
tititiou36 Oct 10, 2025
c90c475
iio: accel: bmc150: Fix irq assumption regression
Nov 3, 2025
79bd003
iio: accel: fix ADXL355 startup race condition
andy9a9 Oct 14, 2025
d8f968d
iio: adc: ad7280a: fix ad7280_store_balance_timer()
dlech Oct 10, 2025
dee8a18
MIPS: mm: Prevent a TLB shutdown on initial uniquification
maciej-w-rozycki Nov 13, 2025
deef34b
MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow
tsbogend Nov 28, 2025
5c316d8
ALSA: usb-audio: Add DSD quirk for LEAK Stereo 230
UncleZI Nov 17, 2025
e753ab4
ARM: dts: nxp: imx6ul: correct SAI3 interrupt line
Oct 24, 2025
214e2e7
atm/fore200e: Fix possible data race in fore200e_open()
2045gemini Nov 20, 2025
cf6f8c4
can: sja1000: fix max irq loop handling
tmuehlbacher Nov 15, 2025
3100448
can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling
marckleinebudde Nov 16, 2025
10d8105
ceph: fix crash in process_v2_sparse_read() for encrypted directories
dubeyko Nov 13, 2025
8e63d31
dm-verity: fix unreliable memory allocation
Nov 17, 2025
cc2f7a4
drivers/usb/dwc3: fix PCI parent check
Nov 7, 2025
ba2312e
smb: client: fix memory leak in cifs_construct_tcon()
pcacjr Nov 24, 2025
7efab71
thunderbolt: Add support for Intel Wildcat Lake
aborzesz Nov 14, 2024
cc20278
slimbus: ngd: Fix reference count leak in qcom_slim_ngd_notify_slaves
Yuuoniy Oct 27, 2025
e218618
firmware: stratix10-svc: fix bug in saving controller data
kromli Nov 2, 2025
4f30d2d
mptcp: clear scheduled subflows on retransmit
Nov 25, 2025
d29a1ef
serial: amba-pl011: prefer dma_mapping_error() over explicit address …
Yuuoniy Oct 27, 2025
120bd52
most: usb: fix double free on late probe failure
jhovold Oct 29, 2025
aa65998
usb: cdns3: Fix double resource release in cdns3_pci_probe
Yuuoniy Oct 26, 2025
f797a90
usb: gadget: f_eem: Fix memory leak in eem_unwrap
Nov 3, 2025
5ffc6b6
usb: renesas_usbhs: Fix synchronous external abort on unbind
claudiubeznea Oct 27, 2025
79f7635
usb: storage: Fix memory leak in USB bulk transport
Oct 31, 2025
0d94e15
USB: storage: Remove subclass and protocol overrides from Novatek quirk
AlanStern Nov 21, 2025
f036324
usb: storage: sddr55: Reject out-of-bound new_pba
Nov 16, 2025
3440468
usb: uas: fix urb unmapping issue when the uas device is remove durin…
Nov 20, 2025
f4c56ae
usb: dwc3: pci: add support for the Intel Nova Lake -S
Nov 6, 2025
d4b1ac6
usb: dwc3: pci: Sort out the Intel device IDs
Nov 7, 2025
81863d0
usb: dwc3: Fix race condition between concurrent dwc3_remove_requests…
Nov 20, 2025
7cc69eb
xhci: dbgtty: Fix data corruption when transmitting data form DbC to …
matnyman Nov 7, 2025
97e16c2
xhci: dbgtty: fix device unregister
Nov 19, 2025
0ceb649
USB: serial: ftdi_sio: add support for u-blox EVK-M101
MrCry0 Oct 30, 2025
2211253
USB: serial: option: add support for Rolling RW101R-GL
Nov 10, 2025
fae686a
drm: sti: fix device leaks at component probe
jhovold Sep 22, 2025
54d1305
drm/amd/display: Check NULL before accessing
Nov 7, 2025
a5aceea
net: dsa: microchip: common: Fix checks on irq_find_mapping()
bastien-curutchet Nov 20, 2025
b4e10f0
net: dsa: microchip: ptp: Fix checks on irq_find_mapping()
bastien-curutchet Nov 20, 2025
2f3c696
libceph: fix potential use-after-free in have_mon_and_osd_map()
idryomov Nov 3, 2025
c6499ff
libceph: prevent potential out-of-bounds writes in handle_auth_sessio…
Nov 14, 2025
1bf794d
libceph: replace BUG_ON with bounds check for map->max_osd
Nov 17, 2025
7af6591
bonding: return detailed error when loading native XDP fails
liuhangbin Nov 28, 2025
685d17b
bonding: check xdp prog when set bond mode
Nov 28, 2025
0aace02
nfsd: Replace clamp_t in nfsd4_get_drc_mem()
neilbrown Nov 14, 2025
02d1cb0
usb: udc: Add trace event for usb_gadget_set_state
Dec 2, 2025
92b218c
usb: gadget: udc: fix use-after-free in usb_gadget_state_work
Dec 2, 2025
7afe3c8
usb: typec: ucsi: psy: Set max current to zero when disconnected
jthiesatgoogle Dec 2, 2025
c0a926e
can: rcar_canfd: Fix CAN-FD mode as default
bijudas Dec 1, 2025
d22fc16
iio: adc: rtq6056: Correct the sign bit index
Dec 1, 2025
2fc924c
net: macb: fix unregister_netdev call order in macb_remove()
Nov 28, 2025
f3ff260
staging: rtl8712: Remove driver using deprecated API wext
Nov 27, 2025
60284a4
selftests: mptcp: join: properly kill background tasks
matttbe Nov 27, 2025
2c8f6ba
mptcp: fix duplicate reset on fastclose
Nov 27, 2025
2df36d3
ksmbd: fix use-after-free in session logoff
SeanHeelan Nov 27, 2025
9338359
net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}()
bastien-curutchet Dec 2, 2025
da8e35f
net: dsa: microchip: Free previously initialized ports on init failures
bastien-curutchet Dec 2, 2025
2de1097
HID: core: Harden s32ton() against conversion to 0 bits
AlanStern Dec 3, 2025
c2df469
Linux 6.6.119
gregkh Dec 6, 2025
e65c51a
deepin: config: remove R8712U
opsiff Dec 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -20516,12 +20516,6 @@ S: Maintained
W: http://wiki.laptop.org/go/DCON
F: drivers/staging/olpc_dcon/

STAGING - REALTEK RTL8712U DRIVERS
M: Larry Finger <[email protected]>
M: Florian Schilhabel <[email protected]>.
S: Odd Fixes
F: drivers/staging/rtl8712/

STAGING - SEPS525 LCD CONTROLLER DRIVERS
M: Michael Hennerich <[email protected]>
L: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 118
SUBLEVEL = 119
EXTRAVERSION =
NAME = Pinguïn Aangedreven

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/nxp/imx/imx6ul.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
#sound-dai-cells = <0>;
compatible = "fsl,imx6ul-sai", "fsl,imx6sx-sai";
reg = <0x02030000 0x4000>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_SAI3_IPG>,
<&clks IMX6UL_CLK_SAI3>,
<&clks IMX6UL_CLK_DUMMY>, <&clks IMX6UL_CLK_DUMMY>;
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/configs/deepin_arm64_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4002,7 +4002,6 @@ CONFIG_RTL8192U=m
CONFIG_RTLLIB=m
CONFIG_RTL8192E=m
CONFIG_RTL8723BS=m
CONFIG_R8712U=m
CONFIG_RTS5208=m
CONFIG_VT6655=m
CONFIG_VT6656=m
Expand Down
2 changes: 0 additions & 2 deletions arch/loongarch/configs/deepin_loongarch_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4961,8 +4961,6 @@ CONFIG_PRISM2_USB=m
CONFIG_RTLLIB=m
CONFIG_RTL8192E=m
CONFIG_RTL8723BS=m
CONFIG_R8712U=m
CONFIG_RTS5208=m
CONFIG_VT6655=m
CONFIG_VT6656=m
CONFIG_ADIS16203=m
Expand Down
116 changes: 78 additions & 38 deletions arch/mips/mm/tlb-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/hugetlb.h>
#include <linux/export.h>
#include <linux/sort.h>

#include <asm/cpu.h>
#include <asm/cpu-type.h>
Expand Down Expand Up @@ -506,58 +508,95 @@ static int __init set_ntlb(char *str)

__setup("ntlb=", set_ntlb);

/* Initialise all TLB entries with unique values */
static void r4k_tlb_uniquify(void)

/* Comparison function for EntryHi VPN fields. */
static int r4k_vpn_cmp(const void *a, const void *b)
{
int entry = num_wired_entries();
long v = *(unsigned long *)a - *(unsigned long *)b;
int s = sizeof(long) > sizeof(int) ? sizeof(long) * 8 - 1: 0;
return s ? (v != 0) | v >> s : v;
}

/*
* Initialise all TLB entries with unique values that do not clash with
* what we have been handed over and what we'll be using ourselves.
*/
static void __ref r4k_tlb_uniquify(void)
{
int tlbsize = current_cpu_data.tlbsize;
bool use_slab = slab_is_available();
int start = num_wired_entries();
phys_addr_t tlb_vpn_size;
unsigned long *tlb_vpns;
unsigned long vpn_mask;
int cnt, ent, idx, i;

vpn_mask = GENMASK(cpu_vmbits - 1, 13);
vpn_mask |= IS_ENABLED(CONFIG_64BIT) ? 3ULL << 62 : 1 << 31;

tlb_vpn_size = tlbsize * sizeof(*tlb_vpns);
tlb_vpns = (use_slab ?
kmalloc(tlb_vpn_size, GFP_KERNEL) :
memblock_alloc_raw(tlb_vpn_size, sizeof(*tlb_vpns)));
if (WARN_ON(!tlb_vpns))
return; /* Pray local_flush_tlb_all() is good enough. */

htw_stop();

for (i = start, cnt = 0; i < tlbsize; i++, cnt++) {
unsigned long vpn;

write_c0_index(i);
mtc0_tlbr_hazard();
tlb_read();
tlb_read_hazard();
vpn = read_c0_entryhi();
vpn &= vpn_mask & PAGE_MASK;
tlb_vpns[cnt] = vpn;

/* Prevent any large pages from overlapping regular ones. */
write_c0_pagemask(read_c0_pagemask() & PM_DEFAULT_MASK);
mtc0_tlbw_hazard();
tlb_write_indexed();
tlbw_use_hazard();
}

sort(tlb_vpns, cnt, sizeof(tlb_vpns[0]), r4k_vpn_cmp, NULL);

write_c0_pagemask(PM_DEFAULT_MASK);
write_c0_entrylo0(0);
write_c0_entrylo1(0);

while (entry < current_cpu_data.tlbsize) {
unsigned long asid_mask = cpu_asid_mask(&current_cpu_data);
unsigned long asid = 0;
int idx;
idx = 0;
ent = tlbsize;
for (i = start; i < tlbsize; i++)
while (1) {
unsigned long entryhi, vpn;

/* Skip wired MMID to make ginvt_mmid work */
if (cpu_has_mmid)
asid = MMID_KERNEL_WIRED + 1;
entryhi = UNIQUE_ENTRYHI(ent);
vpn = entryhi & vpn_mask & PAGE_MASK;

/* Check for match before using UNIQUE_ENTRYHI */
do {
if (cpu_has_mmid) {
write_c0_memorymapid(asid);
write_c0_entryhi(UNIQUE_ENTRYHI(entry));
if (idx >= cnt || vpn < tlb_vpns[idx]) {
write_c0_entryhi(entryhi);
write_c0_index(i);
mtc0_tlbw_hazard();
tlb_write_indexed();
ent++;
break;
} else if (vpn == tlb_vpns[idx]) {
ent++;
} else {
write_c0_entryhi(UNIQUE_ENTRYHI(entry) | asid);
idx++;
}
mtc0_tlbw_hazard();
tlb_probe();
tlb_probe_hazard();
idx = read_c0_index();
/* No match or match is on current entry */
if (idx < 0 || idx == entry)
break;
/*
* If we hit a match, we need to try again with
* a different ASID.
*/
asid++;
} while (asid < asid_mask);

if (idx >= 0 && idx != entry)
panic("Unable to uniquify TLB entry %d", idx);

write_c0_index(entry);
mtc0_tlbw_hazard();
tlb_write_indexed();
entry++;
}
}

tlbw_use_hazard();
htw_start();
flush_micro_tlb();
if (use_slab)
kfree(tlb_vpns);
else
memblock_free(tlb_vpns, tlb_vpn_size);
}

/*
Expand Down Expand Up @@ -600,6 +639,7 @@ static void r4k_tlb_configure(void)

/* From this point on the ARC firmware is dead. */
r4k_tlb_uniquify();
local_flush_tlb_all();

/* Did I tell you that ARC SUCKS? */
}
Expand Down
1 change: 0 additions & 1 deletion arch/riscv/configs/deepin_riscv64_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,6 @@ CONFIG_VHOST_VSOCK=m
CONFIG_VHOST_VDPA=m
CONFIG_STAGING=y
CONFIG_RTL8723BS=m
CONFIG_R8712U=m
CONFIG_MAILBOX=y
CONFIG_POLARFIRE_SOC_MAILBOX=m
CONFIG_SUN50I_IOMMU=y
Expand Down
1 change: 0 additions & 1 deletion arch/x86/configs/deepin_x86_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4776,7 +4776,6 @@ CONFIG_RTL8192U=m
CONFIG_RTLLIB=m
CONFIG_RTL8192E=m
CONFIG_RTL8723BS=m
CONFIG_R8712U=m
CONFIG_RTS5208=m
CONFIG_VT6655=m
CONFIG_VT6656=m
Expand Down
10 changes: 5 additions & 5 deletions arch/x86/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2782,13 +2782,13 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
return;
}

if (perf_callchain_store(entry, regs->ip))
return;

if (perf_hw_regs(regs))
if (perf_hw_regs(regs)) {
if (perf_callchain_store(entry, regs->ip))
return;
unwind_start(&state, current, regs, NULL);
else
} else {
unwind_start(&state, current, NULL, (void *)regs->sp);
}

for (; !unwind_done(&state); unwind_next_frame(&state)) {
addr = unwind_get_return_address(&state);
Expand Down
2 changes: 2 additions & 0 deletions drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,9 @@ fore200e_open(struct atm_vcc *vcc)

vcc->dev_data = NULL;

mutex_lock(&fore200e->rate_mtx);
fore200e->available_cell_rate += vcc->qos.txtp.max_pcr;
mutex_unlock(&fore200e->rate_mtx);

kfree(fore200e_vcc);
return -EINVAL;
Expand Down
7 changes: 4 additions & 3 deletions drivers/firmware/stratix10-svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ struct stratix10_svc_data {
* @complete_status: state for completion
* @svc_fifo_lock: protect access to service message data queue
* @invoke_fn: function to issue secure monitor call or hypervisor call
* @svc: manages the list of client svc drivers
*
* This struct is used to create communication channels for service clients, to
* handle secure monitor or hypervisor call.
Expand All @@ -150,6 +151,7 @@ struct stratix10_svc_controller {
struct completion complete_status;
spinlock_t svc_fifo_lock;
svc_invoke_fn *invoke_fn;
struct stratix10_svc *svc;
};

/**
Expand Down Expand Up @@ -1209,6 +1211,7 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto err_free_kfifo;
}
controller->svc = svc;

svc->stratix10_svc_rsu = platform_device_alloc(STRATIX10_RSU, 0);
if (!svc->stratix10_svc_rsu) {
Expand Down Expand Up @@ -1236,8 +1239,6 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
goto err_unregister_dev;
}

dev_set_drvdata(dev, svc);

pr_info("Intel Service Layer Driver Initialized\n");

return 0;
Expand All @@ -1253,8 +1254,8 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)

static int stratix10_svc_drv_remove(struct platform_device *pdev)
{
struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
struct stratix10_svc *svc = ctrl->svc;

platform_device_unregister(svc->intel_svc_fcs);
platform_device_unregister(svc->stratix10_svc_rsu);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,8 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
chip_name = "navi12";
break;
case CHIP_CYAN_SKILLFISH:
if (adev->mman.discovery_bin)
return 0;
chip_name = "cyan_skillfish";
break;
}
Expand Down
11 changes: 8 additions & 3 deletions drivers/gpu/drm/amd/display/dc/core/dc_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,14 @@ bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
{
uint8_t i;
bool ret = false;
struct dc *dc = stream->ctx->dc;
struct resource_context *res_ctx =
&dc->current_state->res_ctx;
struct dc *dc;
struct resource_context *res_ctx;

if (!stream->ctx)
return false;

dc = stream->ctx->dc;
res_ctx = &dc->current_state->res_ctx;

for (i = 0; i < MAX_PIPES; i++) {
struct timing_generator *tg = res_ctx->pipe_ctx[i].stream_res.tg;
Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/sti/sti_vtg.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,17 @@ struct sti_vtg {
struct sti_vtg *of_vtg_find(struct device_node *np)
{
struct platform_device *pdev;
struct sti_vtg *vtg;

pdev = of_find_device_by_node(np);
if (!pdev)
return NULL;

return (struct sti_vtg *)platform_get_drvdata(pdev);
vtg = platform_get_drvdata(pdev);

put_device(&pdev->dev);

return vtg;
}

static void vtg_reset(struct sti_vtg *vtg)
Expand Down
7 changes: 6 additions & 1 deletion drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,12 @@ EXPORT_SYMBOL_GPL(hid_snto32);

static u32 s32ton(__s32 value, unsigned n)
{
s32 a = value >> (n - 1);
s32 a;

if (!value || !n)
return 0;

a = value >> (n - 1);
if (a && a != -1)
return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
return value & ((1 << n) - 1);
Expand Down
Loading
Loading