From b15fc7c2c88e7a97fa347446301c37272de20ed5 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Wed, 12 May 2021 22:36:12 +0200 Subject: PNP: Remove pnp_alloc() The kernel will complain anyway if it runs out of memory, so it is not necessary to print an extra error message when that happens and kzalloc() can be called directly instead of pnp_alloc() which then becomes redundant and can be dropped. Signed-off-by: Heiner Kallweit [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/pnp/core.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/pnp/core.c') diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index a50ab002e9e4..ccdfbf3978c0 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -31,18 +31,6 @@ DEFINE_MUTEX(pnp_lock); int pnp_platform_devices; EXPORT_SYMBOL(pnp_platform_devices); -void *pnp_alloc(long size) -{ - void *result; - - result = kzalloc(size, GFP_KERNEL); - if (!result) { - printk(KERN_ERR "pnp: Out of Memory\n"); - return NULL; - } - return result; -} - static void pnp_remove_protocol(struct pnp_protocol *protocol) { mutex_lock(&pnp_lock); -- cgit v1.2.3