PM: wakeup: remove redundant assignment to variable retval
authorColin Ian King <colin.king@canonical.com>
Fri, 16 Apr 2021 12:43:52 +0000 (13:43 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Apr 2021 13:22:38 +0000 (15:22 +0200)
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>
drivers/base/power/wakeup_stats.c

index 5ade753..924fac4 100644 (file)
@@ -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) {