lkml.org 
[lkml]   [2018]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tpm: fix unused-value issues in tpm_try_transmit
On Wed, Oct 10, 2018 at 08:06:38AM -0600, Jason Gunthorpe wrote:
> On Wed, Oct 10, 2018 at 03:38:17PM +0200, Gustavo A. R. Silva wrote:
> > Currently, there are some values assigned to variable *rc*, which
> > are never actually used in any computation, because such variable
> > is updated at line 550, before they can be used:
> >
> > 549out:
> > 550 rc = tpm_go_idle(chip, flags);
> > 551 if (rc)
> > 552 goto out;
> >
> > Fix this by removing such assignments.
>
> Should this be done by not quashing rc during the error unwind rather
> than dropping the errors?

Yeah.`

Wondering if tpm_go_idle() should simply be a void-function i.e. issue
just a warning inside (disclaimer: did not revisit its code when writing
this).

> Jason

/Jarkko

\
 
 \ /
  Last update: 2018-10-11 14:02    [W:0.047 / U:3.780 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site