[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyJo4dvULIflwhXL@freedom.csh.rit.edu>
Date: Wed, 30 Oct 2024 13:12:01 -0400
From: Mary Strodl <mstrodl@....rit.edu>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v1 1/2] gpio: mpsse: Check for error code from
devm_mutex_init() call
Hello Andy!
On Wed, Oct 30, 2024 at 05:30:26PM +0200, Andy Shevchenko wrote:
> 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.
Totally missed this... Thanks!
> @@ -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;
> +
> + ret = devm_mutex_init(dev, &priv->irq_mutex);
I think this should be `err = `
Other than that, it looks good to me (I doubt you need this, but just in case):
Reviewed-by: Mary Strodl <mstrodl@....rit.edu>
Thanks!
Powered by blists - more mailing lists