Replace kmalloc/memset pair to kzalloc in ines_allocate_private.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
---
v3:
- Split commit into smaller pieces
- Improve changelog
drivers/gpib/ines/ines_gpib.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpib/ines/ines_gpib.c b/drivers/gpib/ines/ines_gpib.c
index a3cf846fd0f9..bab11b50adaa 100644
--- a/drivers/gpib/ines/ines_gpib.c
+++ b/drivers/gpib/ines/ines_gpib.c
@@ -657,11 +657,10 @@ static int ines_allocate_private(struct gpib_board *board)
{
struct ines_priv *priv;
- board->private_data = kmalloc(sizeof(struct ines_priv), GFP_KERNEL);
+ board->private_data = kzalloc(sizeof(struct ines_priv), GFP_KERNEL);
if (!board->private_data)
return -1;
priv = board->private_data;
- memset(priv, 0, sizeof(struct ines_priv));
init_nec7210_private(&priv->nec7210_priv);
return 0;
}
--
2.43.0