[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241126172240.6044-4-raag.jadav@intel.com>
Date: Tue, 26 Nov 2024 22:52:37 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: gregkh@...uxfoundation.org,
linus.walleij@...aro.org,
mika.westerberg@...ux.intel.com,
andriy.shevchenko@...ux.intel.com,
dmitry.torokhov@...il.com,
broonie@...nel.org,
pierre-louis.bossart@...ux.dev
Cc: linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org,
linux-sound@...r.kernel.org,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v2 3/6] pinctrl: tangier: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() which is more robust.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
drivers/pinctrl/intel/pinctrl-tangier.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-tangier.c b/drivers/pinctrl/intel/pinctrl-tangier.c
index 2cb0b4758269..305547100baa 100644
--- a/drivers/pinctrl/intel/pinctrl-tangier.c
+++ b/drivers/pinctrl/intel/pinctrl-tangier.c
@@ -524,7 +524,6 @@ static int tng_pinctrl_probe(struct platform_device *pdev,
struct device *dev = &pdev->dev;
struct tng_family *families;
struct tng_pinctrl *tp;
- size_t families_len;
void __iomem *regs;
unsigned int i;
@@ -543,8 +542,8 @@ static int tng_pinctrl_probe(struct platform_device *pdev,
* Make a copy of the families which we can use to hold pointers
* to the registers.
*/
- families_len = size_mul(sizeof(*families), tp->nfamilies);
- families = devm_kmemdup(dev, tp->families, families_len, GFP_KERNEL);
+ families = devm_kmemdup_array(dev, tp->families, tp->nfamilies,
+ sizeof(*families), GFP_KERNEL);
if (!families)
return -ENOMEM;
--
2.35.3
Powered by blists - more mailing lists