diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2021-05-12 23:36:12 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-05-17 17:54:01 +0300 |
commit | b15fc7c2c88e7a97fa347446301c37272de20ed5 (patch) | |
tree | 5943f74ca5f61ee49c2734622beb3d06c10a4289 /drivers/pnp/card.c | |
parent | daadabfbd36d57a158623fa81585a4e9aa954c53 (diff) | |
download | linux-b15fc7c2c88e7a97fa347446301c37272de20ed5.tar.xz |
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 <hkallweit1@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pnp/card.c')
-rw-r--r-- | drivers/pnp/card.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index c2464ee08e4a..2430c14f472d 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -80,7 +80,7 @@ static int card_probe(struct pnp_card *card, struct pnp_card_driver *drv) if (!id) return 0; - clink = pnp_alloc(sizeof(*clink)); + clink = kzalloc(sizeof(*clink), GFP_KERNEL); if (!clink) return 0; clink->card = card; |