lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Apr 2016 21:55:40 +0200
From:	"H. Nikolaus Schaller" <hns@...delico.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Peter Ujfalusi <peter.ujfalusi@...com>,
	"H. Nikolaus Schaller" <hns@...delico.com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...a-handheld.com, letux-kernel@...nphoenux.org
Subject: [PATCH 4/5] input: twl6040-vibra: ignore return value of schedule_work

returning ret is wrong. And checking for an error as well. User space
may call multiple times until the work is really scheduled.

twl4030-vibra.c also ignores the return value.

Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
---
 drivers/input/misc/twl6040-vibra.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 3805129..69c5940 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -212,11 +212,7 @@ static int vibra_play(struct input_dev *input, void *data,
 	info->strong_speed = effect->u.rumble.strong_magnitude;
 	info->direction = effect->direction < EFFECT_DIR_180_DEG ? 1 : -1;
 
-	ret = schedule_work(&info->play_work);
-	if (!ret) {
-		dev_info(&input->dev, "work is already on queue\n");
-		return ret;
-	}
+	schedule_work(&info->play_work);
 
 	return 0;
 }
-- 
2.7.3

Powered by blists - more mailing lists