PM: wakeup: remove redundant assignment to variable retval

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>
This commit is contained in:
Colin Ian King 2021-04-16 13:43:52 +01:00 committed by Rafael J. Wysocki
parent f5d1499ae2
commit e48802333a

View 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) {