]> git.hungrycats.org Git - linux/commit
pinctrl: at91: fix a couple NULL vs IS_ERR() checks
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 22 May 2023 07:44:54 +0000 (10:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:45 +0000 (19:39 +0200)
commite26d48b0aee609982d4c553c506cb0e2d8638b9d
tree5c7d695368800ee07eebffeb361b43583f26ab47
parent1a520b69582c9cb229ce2bb3a6295f214b42f7b3
pinctrl: at91: fix a couple NULL vs IS_ERR() checks

[ Upstream commit 35216718c9ac2aef934ea9cd229572d4996807b2 ]

The devm_kasprintf_strarray() function doesn't return NULL on error,
it returns error pointers.  Update the checks accordingly.

Fixes: f494c1913cbb ("pinctrl: at91: use devm_kasprintf() to avoid potential leaks (part 2)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Ryan Wanner <ryan.wanner@microchip.com>
Link: https://lore.kernel.org/r/5697980e-f687-47a7-9db8-2af34ae464bd@kili.mountain
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-at91.c