.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2005 Samsung Electronics |
---|
3 | 4 | * Kyungmin Park <kyungmin.park@samsung.com> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | 5 | * |
---|
9 | 6 | * Overview: |
---|
10 | 7 | * This is a device driver for the OneNAND flash for generic boards. |
---|
.. | .. |
---|
56 | 53 | } |
---|
57 | 54 | |
---|
58 | 55 | info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL; |
---|
59 | | - info->onenand.irq = platform_get_irq(pdev, 0); |
---|
| 56 | + |
---|
| 57 | + err = platform_get_irq(pdev, 0); |
---|
| 58 | + if (err < 0) |
---|
| 59 | + goto out_iounmap; |
---|
| 60 | + |
---|
| 61 | + info->onenand.irq = err; |
---|
60 | 62 | |
---|
61 | 63 | info->mtd.dev.parent = &pdev->dev; |
---|
62 | 64 | info->mtd.priv = &info->onenand; |
---|