Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53a31eab authored by Alok Chauhan's avatar Alok Chauhan
Browse files

i3c: master-qcom-geni: Add NULL pointer check



Add null pointer check while iterating over all
I3C device present on the bus before reading
device information in DAA sequence.

Change-Id: I36ded06b51a3d330cf9e1fe85ea6314432a708ad
Signed-off-by: default avatarAlok Chauhan <alokc@codeaurora.org>
parent 2cea1f57
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -613,6 +613,10 @@ static void geni_i3c_perform_daa(struct geni_i3c_dev *gi3c)
			((u64)rx_buf[5]);

		i3c_bus_for_each_i3cdev(bus, i3cdev) {

			if (!i3cdev->dev)
				continue;

			i3c_device_get_info(i3cdev->dev, &info);
			if (pid == info.pid &&
				dcr == info.dcr &&