Skip to content

Commit d6840a5

Browse files
Sergey Shtylyovwsakernel
authored andcommitted
i2c: s3c2410: fix IRQ check
Iff platform_get_irq() returns 0, the driver's probe() method will return 0 early (as if the method's call was successful). Let's consider IRQ0 valid for simplicity -- devm_request_irq() can always override that decision... Fixes: e0d1ec9 ("i2c-s3c2410: Change IRQ to be plain integer.") Signed-off-by: Sergey Shtylyov <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent a129950 commit d6840a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-s3c2410.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
11371137
*/
11381138
if (!(i2c->quirks & QUIRK_POLL)) {
11391139
i2c->irq = ret = platform_get_irq(pdev, 0);
1140-
if (ret <= 0) {
1140+
if (ret < 0) {
11411141
dev_err(&pdev->dev, "cannot find IRQ\n");
11421142
clk_unprepare(i2c->clk);
11431143
return ret;

0 commit comments

Comments
 (0)