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

Input: auo-pixcir-ts - 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 warnings:

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

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Javier Martinez Canillas and committed by
Dmitry Torokhov
901ea5e3 a47fcbc2

+1 -6
+1 -6
drivers/input/touchscreen/auo-pixcir-ts.c
··· 399 399 static int auo_pixcir_input_open(struct input_dev *dev) 400 400 { 401 401 struct auo_pixcir_ts *ts = input_get_drvdata(dev); 402 - int ret; 403 402 404 - ret = auo_pixcir_start(ts); 405 - if (ret) 406 - return ret; 407 - 408 - return 0; 403 + return auo_pixcir_start(ts); 409 404 } 410 405 411 406 static void auo_pixcir_input_close(struct input_dev *dev)