.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * LCD driver for MIPI DBI-C / DCS compatible LCDs |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2006 Nokia Corporation |
---|
5 | 6 | * Author: Imre Deak <imre.deak@nokia.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify it |
---|
8 | | - * under the terms of the GNU General Public License as published by the |
---|
9 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
10 | | - * option) any later version. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but |
---|
13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | | - * General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License along |
---|
18 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
---|
19 | | - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
20 | 7 | */ |
---|
21 | 8 | #include <linux/device.h> |
---|
22 | 9 | #include <linux/delay.h> |
---|
.. | .. |
---|
576 | 563 | |
---|
577 | 564 | r = mipid_detect(md); |
---|
578 | 565 | if (r < 0) |
---|
579 | | - return r; |
---|
| 566 | + goto free_md; |
---|
580 | 567 | |
---|
581 | 568 | omapfb_register_panel(&md->panel); |
---|
582 | 569 | |
---|
583 | 570 | return 0; |
---|
| 571 | + |
---|
| 572 | +free_md: |
---|
| 573 | + kfree(md); |
---|
| 574 | + return r; |
---|
584 | 575 | } |
---|
585 | 576 | |
---|
586 | 577 | static int mipid_spi_remove(struct spi_device *spi) |
---|