diff options
Diffstat (limited to 'drivers/pnp/pnpbios/rsparser.c')
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index ef508a4de557..95b79685a9d1 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -248,7 +248,7 @@ static void | |||
248 | pnpbios_parse_mem_option(unsigned char *p, int size, struct pnp_option *option) | 248 | pnpbios_parse_mem_option(unsigned char *p, int size, struct pnp_option *option) |
249 | { | 249 | { |
250 | struct pnp_mem * mem; | 250 | struct pnp_mem * mem; |
251 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); | 251 | mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); |
252 | if (!mem) | 252 | if (!mem) |
253 | return; | 253 | return; |
254 | mem->min = ((p[5] << 8) | p[4]) << 8; | 254 | mem->min = ((p[5] << 8) | p[4]) << 8; |
@@ -264,7 +264,7 @@ static void | |||
264 | pnpbios_parse_mem32_option(unsigned char *p, int size, struct pnp_option *option) | 264 | pnpbios_parse_mem32_option(unsigned char *p, int size, struct pnp_option *option) |
265 | { | 265 | { |
266 | struct pnp_mem * mem; | 266 | struct pnp_mem * mem; |
267 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); | 267 | mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); |
268 | if (!mem) | 268 | if (!mem) |
269 | return; | 269 | return; |
270 | mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; | 270 | mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; |
@@ -280,7 +280,7 @@ static void | |||
280 | pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, struct pnp_option *option) | 280 | pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, struct pnp_option *option) |
281 | { | 281 | { |
282 | struct pnp_mem * mem; | 282 | struct pnp_mem * mem; |
283 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); | 283 | mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); |
284 | if (!mem) | 284 | if (!mem) |
285 | return; | 285 | return; |
286 | mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; | 286 | mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; |
@@ -297,7 +297,7 @@ pnpbios_parse_irq_option(unsigned char *p, int size, struct pnp_option *option) | |||
297 | struct pnp_irq * irq; | 297 | struct pnp_irq * irq; |
298 | unsigned long bits; | 298 | unsigned long bits; |
299 | 299 | ||
300 | irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); | 300 | irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL); |
301 | if (!irq) | 301 | if (!irq) |
302 | return; | 302 | return; |
303 | bits = (p[2] << 8) | p[1]; | 303 | bits = (p[2] << 8) | p[1]; |
@@ -314,7 +314,7 @@ static void | |||
314 | pnpbios_parse_dma_option(unsigned char *p, int size, struct pnp_option *option) | 314 | pnpbios_parse_dma_option(unsigned char *p, int size, struct pnp_option *option) |
315 | { | 315 | { |
316 | struct pnp_dma * dma; | 316 | struct pnp_dma * dma; |
317 | dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); | 317 | dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL); |
318 | if (!dma) | 318 | if (!dma) |
319 | return; | 319 | return; |
320 | dma->map = p[1]; | 320 | dma->map = p[1]; |
@@ -327,7 +327,7 @@ static void | |||
327 | pnpbios_parse_port_option(unsigned char *p, int size, struct pnp_option *option) | 327 | pnpbios_parse_port_option(unsigned char *p, int size, struct pnp_option *option) |
328 | { | 328 | { |
329 | struct pnp_port * port; | 329 | struct pnp_port * port; |
330 | port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); | 330 | port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL); |
331 | if (!port) | 331 | if (!port) |
332 | return; | 332 | return; |
333 | port->min = (p[3] << 8) | p[2]; | 333 | port->min = (p[3] << 8) | p[2]; |
@@ -343,7 +343,7 @@ static void | |||
343 | pnpbios_parse_fixed_port_option(unsigned char *p, int size, struct pnp_option *option) | 343 | pnpbios_parse_fixed_port_option(unsigned char *p, int size, struct pnp_option *option) |
344 | { | 344 | { |
345 | struct pnp_port * port; | 345 | struct pnp_port * port; |
346 | port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); | 346 | port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL); |
347 | if (!port) | 347 | if (!port) |
348 | return; | 348 | return; |
349 | port->min = port->max = (p[2] << 8) | p[1]; | 349 | port->min = port->max = (p[2] << 8) | p[1]; |
@@ -527,7 +527,7 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de | |||
527 | case SMALL_TAG_COMPATDEVID: /* compatible ID */ | 527 | case SMALL_TAG_COMPATDEVID: /* compatible ID */ |
528 | if (len != 4) | 528 | if (len != 4) |
529 | goto len_err; | 529 | goto len_err; |
530 | dev_id = kcalloc(1, sizeof (struct pnp_id), GFP_KERNEL); | 530 | dev_id = kzalloc(sizeof (struct pnp_id), GFP_KERNEL); |
531 | if (!dev_id) | 531 | if (!dev_id) |
532 | return NULL; | 532 | return NULL; |
533 | memset(dev_id, 0, sizeof(struct pnp_id)); | 533 | memset(dev_id, 0, sizeof(struct pnp_id)); |