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:   Tue, 9 May 2017 17:46:54 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Fabio Estevam <festevam@...il.com>
Cc:     linux-input@...r.kernel.org, KT Liao <ktalex.liao@...il.com>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Guenter Roeck <linux@...ck-us.net>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] Input: elan_i2c - check if device is there before
 really probing

On Mon, May 08, 2017 at 10:43:36PM -0300, Fabio Estevam wrote:
> On Mon, May 8, 2017 at 9:45 PM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> 
> > +       /* Make sure there is something at this address */
> > +       error = i2c_smbus_read_byte(client);
> > +       if (error < 0) {
> > +               dev_dbg(&client->dev, "nothing at this address: %d\n", error);
> > +               return -ENXIO;
> 
> You could return the real error code here: 'return error'

That is the point of the patch - we want to fail silently if the device
is not actually there and fails even the simplest communication. Driver
core treats ENXIO and ENODEV as special and does not log errors.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ