]> git.karo-electronics.de Git - linux-beck.git/commitdiff
char/tpm/tpm_i2c_stm_st33: drop temporary variable for return value
authorPeter Huewe <peterhuewe@gmx.de>
Tue, 29 Jan 2013 21:02:02 +0000 (22:02 +0100)
committerKent Yoder <key@linux.vnet.ibm.com>
Tue, 5 Feb 2013 15:38:26 +0000 (09:38 -0600)
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>
drivers/char/tpm/tpm_i2c_stm_st33.c

index b14c4b59958d9859f34a45acd5b736428e09a172..1f5f71e14abea20e963b727006beb4ed84bb96f3 100644 (file)
@@ -96,16 +96,14 @@ enum tis_defaults {
 static int write8_reg(struct i2c_client *client, u8 tpm_register,
                      u8 *tpm_data, u16 tpm_size)
 {
-       int value = 0;
        struct st33zp24_platform_data *pin_infos;
 
        pin_infos = client->dev.platform_data;
 
        pin_infos->tpm_i2c_buffer[0][0] = tpm_register;
        memcpy(&pin_infos->tpm_i2c_buffer[0][1], tpm_data, tpm_size);
-       value = i2c_master_send(client, pin_infos->tpm_i2c_buffer[0],
+       return i2c_master_send(client, pin_infos->tpm_i2c_buffer[0],
                                tpm_size + 1);
-       return value;
 } /* write8_reg() */
 
 /*