aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/hid-sony.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 14763cdf6393..3385006accc0 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2524,6 +2524,19 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
2524 return ret; 2524 return ret;
2525 } 2525 }
2526 2526
2527 /* sony_input_configured can fail, but this doesn't result
2528 * in hid_hw_start failures (intended). Check whether
2529 * the HID layer claimed the device else fail.
2530 * We don't know the actual reason for the failure, most
2531 * likely it is due to EEXIST in case of double connection
2532 * of USB and Bluetooth, but could have been due to ENOMEM
2533 * or other reasons as well.
2534 */
2535 if (!(hdev->claimed & HID_CLAIMED_INPUT)) {
2536 hid_err(hdev, "failed to claim input\n");
2537 return -ENODEV;
2538 }
2539
2527 return ret; 2540 return ret;
2528} 2541}
2529 2542