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

Commit 10aa9cf4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: sensors: fix the irq not free issue when apds9930 probe fails"

parents 0ae1cd58 971163cb
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2292,15 +2292,6 @@ static int apds993x_probe(struct i2c_client *client,

	mutex_init(&data->update_lock);

	err = request_irq(data->irq, apds993x_interrupt, IRQF_TRIGGER_FALLING,
			   	APDS993X_DRV_NAME, (void *)client);
	if (err < 0) {
		pr_err("%s: Could not allocate APDS993X_INT !\n", __func__);
		goto exit_kfree;
	}

	irq_set_irq_wake(client->irq, 1);

	INIT_DELAYED_WORK(&data->dwork, apds993x_work_handler);

#ifdef ALS_POLLING_ENABLED
@@ -2314,6 +2305,15 @@ static int apds993x_probe(struct i2c_client *client,
		goto exit_kfree;
	}

	err = request_irq(data->irq, apds993x_interrupt, IRQF_TRIGGER_FALLING,
				APDS993X_DRV_NAME, (void *)client);
	if (err < 0) {
		pr_err("%s: Could not allocate APDS993X_INT !\n", __func__);
		goto exit_kfree;
	}

	irq_set_irq_wake(client->irq, 1);

	/* Register to Input Device */
	data->input_dev_als = input_allocate_device();
	if (!data->input_dev_als) {