Patch to use M_ZERO
Submitted by: David Malone
This commit is contained in:
parent
4f55983606
commit
a8e5d9ac32
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69287
@ -297,10 +297,9 @@ cardbus_read_device(device_t pcib, int b, int s, int f)
|
||||
|
||||
if (PCIB_READ_CONFIG(pcib, b, s, f, PCIR_DEVVENDOR, 4) != -1) {
|
||||
devlist_entry = malloc(sizeof(struct cardbus_devinfo),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
M_DEVBUF, M_WAITOK | M_ZERO);
|
||||
if (devlist_entry == NULL)
|
||||
return (NULL);
|
||||
bzero(devlist_entry, sizeof *devlist_entry);
|
||||
|
||||
cfg = &devlist_entry->cfg;
|
||||
|
||||
@ -386,12 +385,10 @@ cardbus_readppb(device_t pcib, int b, int s, int f)
|
||||
{
|
||||
pcih1cfgregs *p;
|
||||
|
||||
p = malloc(sizeof (pcih1cfgregs), M_DEVBUF, M_WAITOK);
|
||||
p = malloc(sizeof (pcih1cfgregs), M_DEVBUF, M_WAITOK | M_ZERO);
|
||||
if (p == NULL)
|
||||
return (NULL);
|
||||
|
||||
bzero(p, sizeof *p);
|
||||
|
||||
p->secstat = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_SECSTAT_1, 2);
|
||||
p->bridgectl = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_BRIDGECTL_1, 2);
|
||||
|
||||
@ -432,12 +429,10 @@ cardbus_readpcb(device_t pcib, int b, int s, int f)
|
||||
{
|
||||
pcih2cfgregs *p;
|
||||
|
||||
p = malloc(sizeof (pcih2cfgregs), M_DEVBUF, M_WAITOK);
|
||||
p = malloc(sizeof (pcih2cfgregs), M_DEVBUF, M_WAITOK | M_ZERO);
|
||||
if (p == NULL)
|
||||
return (NULL);
|
||||
|
||||
bzero(p, sizeof *p);
|
||||
|
||||
p->secstat = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_SECSTAT_2, 2);
|
||||
p->bridgectl = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_BRIDGECTL_2, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user