mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 11:35:45 +00:00
gpio: mpsse: Check for error code from devm_mutex_init() call
Even if it's not critical, the avoidance of checking the error code
from devm_mutex_init() call today diminishes the point of using devm
variant of it. Tomorrow it may even leak something. Add the missed
check.
Fixes: c46a74ff05
("gpio: add support for FTDI's MPSSE as GPIO")
Reviewed-by: Mary Strodl <mstrodl@csh.rit.edu>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241030174132.2113286-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
a22c9dc26d
commit
5e3eedf55f
@ -430,8 +430,13 @@ static int gpio_mpsse_probe(struct usb_interface *interface,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
devm_mutex_init(dev, &priv->io_mutex);
|
||||
devm_mutex_init(dev, &priv->irq_mutex);
|
||||
err = devm_mutex_init(dev, &priv->io_mutex);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = devm_mutex_init(dev, &priv->irq_mutex);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
priv->gpio.label = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"gpio-mpsse.%d.%d",
|
||||
|
Loading…
Reference in New Issue
Block a user