Skip to content

Commit

Permalink
Input: wacom_i2c - fix compiler warning
Browse files Browse the repository at this point in the history
Apparently GCC can't figure out that we bail if we fail to query device
and will not try to use 'features':

drivers/input/touchscreen/wacom_i2c.c: In function ‘wacom_i2c_probe’:
drivers/input/touchscreen/wacom_i2c.c:177:20: warning: ‘features.fw_version’
	may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Jul 7, 2012
1 parent f053ea8 commit 8830cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/wacom_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int __devinit wacom_i2c_probe(struct i2c_client *client,
{
struct wacom_i2c *wac_i2c;
struct input_dev *input;
struct wacom_features features;
struct wacom_features features = { 0 };
int error;

if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
Expand Down

0 comments on commit 8830cb8

Please sign in to comment.