Skip to content

Commit

Permalink
Input: kxtj9 - remove unneeded retval variable
Browse files Browse the repository at this point in the history
The retval variable isn't needed since isn't used in the function. Remove
the variable and just return 0 instead.

This also fixes the following make coccicheck warning:

drivers/input/misc/kxtj9.c:638:5-11: Unneeded variable: "retval". Return "0" on line 646

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Javier Martinez Canillas authored and Dmitry Torokhov committed Oct 2, 2015
1 parent 5702222 commit 5ccd9ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/misc/kxtj9.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,15 +635,14 @@ static int __maybe_unused kxtj9_resume(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct kxtj9_data *tj9 = i2c_get_clientdata(client);
struct input_dev *input_dev = tj9->input_dev;
int retval = 0;

mutex_lock(&input_dev->mutex);

if (input_dev->users)
kxtj9_enable(tj9);

mutex_unlock(&input_dev->mutex);
return retval;
return 0;
}

static SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume);
Expand Down

0 comments on commit 5ccd9ab

Please sign in to comment.