blob: 1e364918e17cfb1b1e962f2578461c8ae0b1a9ca [file] [log] [blame]
From 78c08413120dc22375db7b276b89e40e97d27f71 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 25 May 2019 22:09:08 +0800
Subject: [PATCH] HID: logitech-dj: fix return value of
logi_dj_recv_query_hidpp_devices
commit dbcbabf7da921f98beefb4a6f4b91eb62d072076 upstream.
We should return 'retval' as the correct return value
instead of always zero.
Fixes: 74808f9115ce ("HID: logitech-dj: add support for non unifying receivers")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 0af0fb304c0c..651a74df6978 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1123,7 +1123,7 @@ static int logi_dj_recv_query_hidpp_devices(struct dj_receiver_dev *djrcv_dev)
HID_REQ_SET_REPORT);
kfree(hidpp_report);
- return 0;
+ return retval;
}
static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
--
2.27.0