[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1602983516-22913-1-git-send-email-LinoSanfilippo@gmx.de>
Date: Sun, 18 Oct 2020 03:11:54 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: andy.shevchenko@...il.com
Cc: jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
pmeerw@...erw.net, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio:core: In map_array_register() cleanup in case of error
Hi Andy,
Thanks for you suggestion. I agree that it is nicer to reuse the cleanup in
iio_map_array_unregister() than to reimplement it. However I would like to
avoid dropping and regaining the mutex in case of error.
What about the attached approach:
Introduce an unlocked version of iio_map_array_unregister() and then use
this one to unwind in error case. Thus we only need to add two lines of
code, so that Jonathan may be ok with adding it to the main code flow...
Regards,
Lino
Powered by blists - more mailing lists