tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
authorPeter Huewe <PeterHuewe@gmx.de>
Wed, 30 Oct 2013 19:46:55 +0000 (20:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 19:08:15 +0000 (11:08 -0800)
commit2e59688b755c3ad72103b909eeaea388a7cdab0b
tree4a11c75c0677f25a10fef602e30dfd9d037073ac
parent9bf4d6c3c302830f7d7ffec5f6f12948e2f53c9a
tpm/tpm_ppi: Do not compare strcmp(a,b) == -1

commit 747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11 upstream.

Depending on the implementation strcmp might return the difference between
two strings not only -1,0,1 consequently
 if (strcmp (a,b) == -1)
might lead to taking the wrong branch

-> compare with < 0  instead,
which in any case is more canonical.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_ppi.c