From: Rosalie Wanders Date: Fri, 10 Apr 2026 19:53:54 +0000 (+0200) Subject: HID: sony: fix incorrect force-feedback check in sony_suspend() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=278dd0487907112de8e34e1a97ac6145a8081523;p=thirdparty%2Fkernel%2Flinux.git HID: sony: fix incorrect force-feedback check in sony_suspend() This commit fixes the incorrect force-feedback check in sony_suspend(), without this the check will always be true due to checking a constant define that is never 0. Signed-off-by: Rosalie Wanders Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index b5e724676c1de..23db406092ef1 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -2456,11 +2456,10 @@ static void sony_remove(struct hid_device *hdev) static int sony_suspend(struct hid_device *hdev, pm_message_t message) { #ifdef CONFIG_SONY_FF + struct sony_sc *sc = hid_get_drvdata(hdev); /* On suspend stop any running force-feedback events */ - if (SONY_FF_SUPPORT) { - struct sony_sc *sc = hid_get_drvdata(hdev); - + if (sc->quirks & SONY_FF_SUPPORT) { sc->left = sc->right = 0; sony_send_output_report(sc); }