From 704426649dd4324b34cefea322f4333e5280f852 Mon Sep 17 00:00:00 2001 From: Pavan Savoy Date: Fri, 4 Feb 2011 02:23:11 -0600 Subject: drivers:misc: ti-st: fix error codes set-right the error codes that the shared transport driver returns. Instead of magic numbers like -1, return relevant codes such as ETIMEDOUT or EIO, EAGAIN when wait times out or uart write bytes don't match expected value or when registration fails and needs to be attempted again. Signed-off-by: Pavan Savoy Signed-off-by: Greg Kroah-Hartman --- drivers/misc/ti-st/st_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/ti-st/st_ll.c') diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c index 2bda8dea15b0..f72de6b8c343 100644 --- a/drivers/misc/ti-st/st_ll.c +++ b/drivers/misc/ti-st/st_ll.c @@ -130,7 +130,7 @@ unsigned long st_ll_sleep_state(struct st_data_s *st_data, break; default: pr_err(" unknown input/state "); - return -1; + return -EINVAL; } return 0; } -- cgit v1.2.3