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:   Mon, 24 Jul 2017 15:46:23 -0400
From:   Lyude Paul <lyude@...hat.com>
To:     Jiri Kosina <jikos@...nel.org>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        linux-input <linux-input@...r.kernel.org>,
        Andrew Duggan <aduggan@...aptics.com>, stable@...r.kernel.org,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] HID: rmi: Make sure the HID device is opened on resume

Yeah I noticed that, sorry if my response wasn't very clear! Should
probably wait to have my morning coffee before responding to these
messages :P

On Mon, 2017-07-24 at 21:28 +0200, Jiri Kosina wrote:
> On Mon, 24 Jul 2017, Lyude Paul wrote:
> 
> > > > So, call hid_hw_open() in rmi_post_resume() so we make sure
> > > > that
> > > > the
> > > > device is alive before we try talking to it.
> > > > 
> > > > This fixes RMI device suspend/resume over HID.
> > > > -       int ret;
> > > > +       int ret = 0;
> > > 
> > > What's the point?
> > 
> > So that we can use the same out: label at the end of the function
> > that
> > calls hid_hw_close() to return success. This being said though I
> > just
> > realized that setting ret will initialize it to 0 anyway, so I
> > guess
> > this can be dropped
> 
> Andy's point was that hid_hw_open() is obviously re-initializing the
> ret 
> before its first use as a return value, so there is no need to
> initialize 
> it at a declaration time.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ