Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dcd9543 authored by Axel Lin's avatar Axel Lin Committed by Jiri Kosina
Browse files

HID: emsff: properly handle emsff_init failure



emsff_init() may fail, let's properly handle the failure.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent b30d89d1
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -126,7 +126,12 @@ static int ems_probe(struct hid_device *hdev, const struct hid_device_id *id)
		goto err;
		goto err;
	}
	}


	emsff_init(hdev);
	ret = emsff_init(hdev);
	if (ret) {
		dev_err(&hdev->dev, "force feedback init failed\n");
		hid_hw_stop(hdev);
		goto err;
	}


	return 0;
	return 0;
err:
err: