Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: zforce - simplify function return logic

The invoked function already returns zero on success or a negative
errno code so there is no need to open code the logic in the caller.

This also fixes the following make coccicheck warning:

end returns can be simplified and declaration on line 602 can be dropped

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@bq.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Javier Martinez Canillas and committed by
Dmitry Torokhov
a47fcbc2 5ccd9abd

+1 -6
+1 -6
drivers/input/touchscreen/zforce_ts.c
··· 599 599 static int zforce_input_open(struct input_dev *dev) 600 600 { 601 601 struct zforce_ts *ts = input_get_drvdata(dev); 602 - int ret; 603 602 604 - ret = zforce_start(ts); 605 - if (ret) 606 - return ret; 607 - 608 - return 0; 603 + return zforce_start(ts); 609 604 } 610 605 611 606 static void zforce_input_close(struct input_dev *dev)