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]
Message-ID: <20190829182933.GD187474@dtor-ws>
Date:   Thu, 29 Aug 2019 11:29:33 -0700
From:   'Dmitry Torokhov' <dmitry.torokhov@...il.com>
To:     "Johnny.Chuang" <johnny.chuang@....com.tw>
Cc:     linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        STRD2-蔡惠嬋 <jennifer.tsai@....com.tw>,
        STRD2-陳崇明經理 <james.chen@....com.tw>,
        '梁博翔' <paul.liang@....com.tw>,
        'jeff' <jeff.chuang@....com.tw>
Subject: Re: [PATCH] Input: elants_i2c - return real value of
 elants_i2c_initialize()

Hi Johnny,

On Wed, Aug 28, 2019 at 10:33:46AM +0800, Johnny.Chuang wrote:
> The return value of elants_i2c_initialize() was always 0.
> It maybe register input device when initialize fail.

We do not want to return error here, because it will abort probe, and
then we will not be able to initiate firmware flash flow so we can
attempt to recover the device.

If you want to try you can change the ts->iap_mode before trying to
register input device, but then you need to be very careful about
registering and unregistering it later, after flashing or re-flashing
firmware.

> 
> Signed-off-by: Johnny Chuang <johnny.chuang@....com.tw>
> ---
>  drivers/input/touchscreen/elants_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/elants_i2c.c
> b/drivers/input/touchscreen/elants_i2c.c
> index d4ad24e..9c9816f 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -571,7 +571,7 @@ static int elants_i2c_initialize(struct elants_data *ts)
>  	if (error)
>  		ts->iap_mode = ELAN_IAP_RECOVERY;
>  
> -	return 0;
> +	return error;
>  }
>  
>  /*
> -- 
> 2.7.4
> 

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ