Message ID | 20210416124352.2049258-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | PM / wakeup: remove redundant assignment to variable retval | expand |
On Fri, Apr 16, 2021 at 2:44 PM Colin King <colin.king@canonical.com> wrote: > > From: Colin Ian King <colin.king@canonical.com> > > 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> > --- > drivers/base/power/wakeup_stats.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c > index 5ade7539ac02..924fac493c4f 100644 > --- a/drivers/base/power/wakeup_stats.c > +++ b/drivers/base/power/wakeup_stats.c > @@ -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) { > -- Applied as 5.13 material, thanks!
diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c index 5ade7539ac02..924fac493c4f 100644 --- a/drivers/base/power/wakeup_stats.c +++ b/drivers/base/power/wakeup_stats.c @@ -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) {