lkml.org 
[lkml]   [2017]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: rmi: Make sure the HID device is opened on resume
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.

--
Jiri Kosina
SUSE Labs

\
 
 \ /
  Last update: 2017-07-24 21:29    [W:0.078 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site