summaryrefslogtreecommitdiff
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-02 14:13:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-23 18:04:22 +0300
commit45bb08de65b418959313593f527c619e102c2d57 (patch)
tree0366d10ff63d10394cd590f3bee9f070098fea06 /drivers/base/platform.c
parent69b07ee33eb12a505d55e3e716fc7452496b9041 (diff)
downloadlinux-45bb08de65b418959313593f527c619e102c2d57.tar.xz
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 <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200402111341.511801-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 5255550b7c34..2e454c18b3a9 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -668,7 +668,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
struct platform_device *platform_device_register_full(
const struct platform_device_info *pdevinfo)
{
- int ret = -ENOMEM;
+ int ret;
struct platform_device *pdev;
pdev = platform_device_alloc(pdevinfo->name, pdevinfo->id);