Skip to content

Commit a51e224

Browse files
Alain Volmatwsakernel
authored andcommitted
i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq
Convert error handling upon calls of devm_request_irq functions during the probe of the driver. Signed-off-by: Alain Volmat <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 2f18949 commit a51e224

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

drivers/i2c/busses/i2c-stm32f7.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,19 +2199,13 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
21992199
stm32f7_i2c_isr_event_thread,
22002200
IRQF_ONESHOT,
22012201
pdev->name, i2c_dev);
2202-
if (ret) {
2203-
dev_err(&pdev->dev, "Failed to request irq event %i\n",
2204-
irq_event);
2205-
return ret;
2206-
}
2202+
if (ret)
2203+
return dev_err_probe(&pdev->dev, ret, "Failed to request irq event\n");
22072204

22082205
ret = devm_request_irq(&pdev->dev, irq_error, stm32f7_i2c_isr_error, 0,
22092206
pdev->name, i2c_dev);
2210-
if (ret) {
2211-
dev_err(&pdev->dev, "Failed to request irq error %i\n",
2212-
irq_error);
2213-
return ret;
2214-
}
2207+
if (ret)
2208+
return dev_err_probe(&pdev->dev, ret, "Failed to request irq error\n");
22152209

22162210
setup = of_device_get_match_data(&pdev->dev);
22172211
if (!setup) {

0 commit comments

Comments
 (0)