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

Commit 29efc809 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "leds: qpnp-flash-common: Fix possible null pointer dereference"

parents a9092c8b 5e2a583c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ int qpnp_flash_led_prepare(struct led_trigger *trig, int options,
	int rc = -ENODEV;

	led_cdev = trigger_to_lcdev(trig);
	if (!led_cdev)
		return rc;

	list_for_each_entry(flash_data, &flash_common_data, link) {
		if (led_cdev->dev->parent == flash_data->dev)
			rc = flash_data->func(trig, options, max_current);