diff options
| author | Dave Penkler <[email protected]> | 2025-05-21 12:16:55 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2025-05-21 13:01:09 +0000 |
| commit | acb3dac2805d3342ded7dbbd164add32bbfdf21c (patch) | |
| tree | 3f0aa57c92f7c7fd17df548a13fb3741636192b0 /net/unix/af_unix.c | |
| parent | ALSA: qc_audio_offload: try to reduce address space confusion (diff) | |
| download | kernel-acb3dac2805d3342ded7dbbd164add32bbfdf21c.tar.gz kernel-acb3dac2805d3342ded7dbbd164add32bbfdf21c.zip | |
usb: usbtmc: Fix read_stb function and get_stb ioctl
The usbtmc488_ioctl_read_stb function relied on a positive return from
usbtmc_get_stb to reset the srq condition in the driver. The
USBTMC_IOCTL_GET_STB case tested for a positive return to return the stb
to the user.
Commit: <cac01bd178d6> ("usb: usbtmc: Fix erroneous get_stb ioctl
error returns") changed the return value of usbtmc_get_stb to 0 on
success instead of returning the value of usb_control_msg which is
positive in the normal case. This change caused the function
usbtmc488_ioctl_read_stb and the USBTMC_IOCTL_GET_STB ioctl to no
longer function correctly.
Change the test in usbtmc488_ioctl_read_stb to test for failure
first and return the failure code immediately.
Change the test for the USBTMC_IOCTL_GET_STB ioctl to test for 0
instead of a positive value.
Fixes: cac01bd178d6 ("usb: usbtmc: Fix erroneous get_stb ioctl error returns")
Cc: [email protected]
Signed-off-by: Dave Penkler <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
