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

Commit 95b2f82d authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

staging: most: i2c: remove unnecessary poison_channel call



This removes call of the poison_channel that is:
  - not allowed after most_deregister_interface;
  - is made during the most_deregister_interface call.

Signed-off-by: default avatarAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ceb1edc2
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -376,16 +376,11 @@ static int i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
static int i2c_remove(struct i2c_client *client)
static int i2c_remove(struct i2c_client *client)
{
{
	struct hdm_i2c *dev = i2c_get_clientdata(client);
	struct hdm_i2c *dev = i2c_get_clientdata(client);
	int i;


	if (!dev->polling_mode)
	if (!dev->polling_mode)
		free_irq(client->irq, dev);
		free_irq(client->irq, dev);


	most_deregister_interface(&dev->most_iface);
	most_deregister_interface(&dev->most_iface);

	for (i = 0 ; i < NUM_CHANNELS; i++)
		if (dev->is_open[i])
			poison_channel(&dev->most_iface, i);
	cancel_delayed_work_sync(&dev->rx.dwork);
	cancel_delayed_work_sync(&dev->rx.dwork);
	kfree(dev);
	kfree(dev);