Skip to content

Commit

Permalink
PM: wakeup: remove redundant assignment to variable retval
Browse files Browse the repository at this point in the history
The variable retval is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Colin Ian King authored and Rafael J. Wysocki committed Apr 22, 2021
1 parent f5d1499 commit e488023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/power/wakeup_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static struct device *wakeup_source_device_create(struct device *parent,
struct wakeup_source *ws)
{
struct device *dev = NULL;
int retval = -ENODEV;
int retval;

dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev) {
Expand Down

0 comments on commit e488023

Please sign in to comment.