hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/video/fbdev/omap/lcd_mipid.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * LCD driver for MIPI DBI-C / DCS compatible LCDs
34 *
45 * Copyright (C) 2006 Nokia Corporation
56 * 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.
207 */
218 #include <linux/device.h>
229 #include <linux/delay.h>
....@@ -576,11 +563,15 @@
576563
577564 r = mipid_detect(md);
578565 if (r < 0)
579
- return r;
566
+ goto free_md;
580567
581568 omapfb_register_panel(&md->panel);
582569
583570 return 0;
571
+
572
+free_md:
573
+ kfree(md);
574
+ return r;
584575 }
585576
586577 static int mipid_spi_remove(struct spi_device *spi)