if (client->irq > 0) {
dev_info(&client->dev, "IRQ %d supplied\n", client->irq);
- err = request_threaded_irq(client->irq, NULL, rx8025_handle_irq,
- 0, "rx8025", client);
+ err = devm_request_threaded_irq(&client->dev, client->irq, NULL,
+ rx8025_handle_irq, 0, "rx8025",
+ client);
if (err) {
dev_err(&client->dev, "unable to request IRQ\n");
goto errout;
err = rx8025_sysfs_register(&client->dev);
if (err)
- goto errout_irq;
+ goto errout;
return 0;
-errout_irq:
- if (client->irq > 0)
- free_irq(client->irq, client);
-
errout:
dev_err(&adapter->dev, "probing for rx8025 failed\n");
return err;
static int rx8025_remove(struct i2c_client *client)
{
- if (client->irq > 0)
- free_irq(client->irq, client);
-
rx8025_sysfs_unregister(&client->dev);
return 0;
}