Skip to content

Commit 0650d50

Browse files
PeterZhu789hdeller
authored andcommitted
fbdev: goldfishfb: Do not check 0 for platform_get_irq()
Since platform_get_irq() never returned zero, so it need not to check whether it returned zero, and we use the return error code of platform_get_irq() to replace the current return error code. Please refer to the commit a85a6c8 ("driver core: platform: Clarify that IRQ 0 is invalid") to get that platform_get_irq() never returned zero. Signed-off-by: Zhu Wang <wangzhu9@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 73d7f28 commit 0650d50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/video/fbdev/goldfishfb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ static int goldfish_fb_probe(struct platform_device *pdev)
203203
}
204204

205205
fb->irq = platform_get_irq(pdev, 0);
206-
if (fb->irq <= 0) {
207-
ret = -ENODEV;
206+
if (fb->irq < 0) {
207+
ret = fb->irq;
208208
goto err_no_irq;
209209
}
210210

0 commit comments

Comments
 (0)