PM / wakeup: remove redundant assignment to variable retval
Subsystems (5)
PATCH 1/1 PM / wakeup: remove redundant assignment to variable retval
From: Colin Ian King <[email protected]>
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 <[email protected]>
--- drivers/base/power/wakeup_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/wakeup_stats.c +1 -1
@@ -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) {
Signature · 1 line
2.30.2
Quoted 18 lines · Colin King
From: Colin Ian King <[email protected]>
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 <[email protected]>--- drivers/base/power/wakeup_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/base/power/wakeup_stats.c +0
-0
drivers/base/power/wakeup_stats.c static struct device *wakeup_source_device_create(struct device *parent,
Quoted 9 lines
drivers/base/power/wakeup_stats.c +1
-2@@ -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!