diff options
author | phk <phk@FreeBSD.org> | 2003-05-31 20:21:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-31 20:21:53 +0000 |
commit | d7cb459f3c955181b2ffa81602aadd194d3905cc (patch) | |
tree | 3f6099c052b208698d5092ea46f39d1e4d457e74 /sys/isa | |
parent | bebda81688be291c40eb41d279c9f31a880ac7a3 (diff) | |
download | FreeBSD-src-d7cb459f3c955181b2ffa81602aadd194d3905cc.zip FreeBSD-src-d7cb459f3c955181b2ffa81602aadd194d3905cc.tar.gz |
Remove unused variable(s).
Mark a non-critical memoryleak with XXX comment
Found by: FlexeLint
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/pnp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/isa/pnp.c b/sys/isa/pnp.c index 1007886..888c364 100644 --- a/sys/isa/pnp.c +++ b/sys/isa/pnp.c @@ -497,7 +497,6 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn, u_char tag, *resp, *resinfo, *startres = 0; int large_len, scanning = len, retval = FALSE; u_int32_t logical_id; - u_int32_t compat_id; device_t dev = 0; int ldn = 0; struct pnp_set_config_arg *csnldn; @@ -581,7 +580,6 @@ pnp_create_devices(device_t parent, pnp_id *p, int csn, */ bcopy(resinfo, &logical_id, 4); pnp_check_quirks(p->vendor_id, logical_id, ldn, NULL); - compat_id = 0; dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1); if (desc) device_set_desc_copy(dev, desc); @@ -664,8 +662,10 @@ pnp_read_bytes(int amount, u_char **resourcesp, int *spacep, int *lenp) while (len + amount > space + extra) extra += 1024; newres = malloc(space + extra, M_TEMP, M_NOWAIT); - if (!newres) + if (!newres) { + /* XXX: free resources */ return ENOMEM; + } bcopy(resources, newres, len); free(resources, M_TEMP); resources = newres; |