Skip to content

Commit 45bb08d

Browse files
Colin Ian Kinggregkh
authored andcommitted
driver core: platform: remove redundant assignment to variable ret
The variable ret 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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 69b07ee commit 45bb08d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
668668
struct platform_device *platform_device_register_full(
669669
const struct platform_device_info *pdevinfo)
670670
{
671-
int ret = -ENOMEM;
671+
int ret;
672672
struct platform_device *pdev;
673673

674674
pdev = platform_device_alloc(pdevinfo->name, pdevinfo->id);

0 commit comments

Comments
 (0)