mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
i3c: Make dev->desc locking assumptions explicit
i3c_device_get_info() takes the bus normal-use lock before accessing dev->desc. Under that lock, the descriptor pointer is guaranteed to be valid for the duration of the access. Remove the unnecessary NULL check on dev->desc so the code more clearly reflects the locking rules and expected descriptor lifetime. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260807145638.168865-6-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
feb0ed7660
commit
4083d192f6
|
|
@ -101,8 +101,7 @@ void i3c_device_get_info(const struct i3c_device *dev,
|
|||
return;
|
||||
|
||||
i3c_bus_normaluse_lock(dev->bus);
|
||||
if (dev->desc)
|
||||
*info = dev->desc->info;
|
||||
*info = dev->desc->info;
|
||||
i3c_bus_normaluse_unlock(dev->bus);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(i3c_device_get_info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user