From 3e55226c46d97ea88f409f7d69bc2155644f94a7 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Wed, 23 Feb 2005 00:43:00 +0000 Subject: [PATCH] kill dead code Noticed by: Coverity Prevent analysis tool --- sys/kern/subr_bus.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 4179fc703840..19568f0504a2 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -200,10 +200,7 @@ devclass_sysctl_handler(SYSCTL_HANDLER_ARGS) { devclass_t dc = (devclass_t)arg1; const char *value; - char *buf; - int error; - buf = NULL; switch (arg2) { case DEVCLASS_SYSCTL_PARENT: value = dc->parent ? dc->parent->name : ""; @@ -211,10 +208,7 @@ devclass_sysctl_handler(SYSCTL_HANDLER_ARGS) default: return (EINVAL); } - error = SYSCTL_OUT(req, value, strlen(value)); - if (buf != NULL) - free(buf, M_BUS); - return (error); + return (SYSCTL_OUT(req, value, strlen(value))); } static void