diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2013-01-29 16:02:02 -0500 |
---|---|---|
committer | Kent Yoder <key@linux.vnet.ibm.com> | 2013-02-05 10:38:26 -0500 |
commit | 7333549bf4f345d338825dcd5b85400600e4cae7 (patch) | |
tree | 60af59d367bb66363a4652e63dbcd3ede3efe4be /drivers/char/tpm | |
parent | 07d721688b8464662393f3b3136defbbad52be75 (diff) |
char/tpm/tpm_i2c_stm_st33: drop temporary variable for return value
We don't need a temporary variable just to store the return value which
gets return in the next statement.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm_i2c_stm_st33.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index b14c4b59958d..1f5f71e14abe 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c | |||
@@ -96,16 +96,14 @@ enum tis_defaults { | |||
96 | static int write8_reg(struct i2c_client *client, u8 tpm_register, | 96 | static int write8_reg(struct i2c_client *client, u8 tpm_register, |
97 | u8 *tpm_data, u16 tpm_size) | 97 | u8 *tpm_data, u16 tpm_size) |
98 | { | 98 | { |
99 | int value = 0; | ||
100 | struct st33zp24_platform_data *pin_infos; | 99 | struct st33zp24_platform_data *pin_infos; |
101 | 100 | ||
102 | pin_infos = client->dev.platform_data; | 101 | pin_infos = client->dev.platform_data; |
103 | 102 | ||
104 | pin_infos->tpm_i2c_buffer[0][0] = tpm_register; | 103 | pin_infos->tpm_i2c_buffer[0][0] = tpm_register; |
105 | memcpy(&pin_infos->tpm_i2c_buffer[0][1], tpm_data, tpm_size); | 104 | memcpy(&pin_infos->tpm_i2c_buffer[0][1], tpm_data, tpm_size); |
106 | value = i2c_master_send(client, pin_infos->tpm_i2c_buffer[0], | 105 | return i2c_master_send(client, pin_infos->tpm_i2c_buffer[0], |
107 | tpm_size + 1); | 106 | tpm_size + 1); |
108 | return value; | ||
109 | } /* write8_reg() */ | 107 | } /* write8_reg() */ |
110 | 108 | ||
111 | /* | 109 | /* |