From d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 02:45:28 +0000 Subject: [PATCH] add boot partition size --- kernel/drivers/mtd/devices/st_spi_fsm.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/kernel/drivers/mtd/devices/st_spi_fsm.c b/kernel/drivers/mtd/devices/st_spi_fsm.c index 55d4a77..9bee99f 100644 --- a/kernel/drivers/mtd/devices/st_spi_fsm.c +++ b/kernel/drivers/mtd/devices/st_spi_fsm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * st_spi_fsm.c - ST Fast Sequence Mode (FSM) Serial Flash Controller * @@ -6,11 +7,6 @@ * Copyright (C) 2010-2014 STMicroelectronics Limited * * JEDEC probe based on drivers/mtd/devices/m25p80.c - * - * This code is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * */ #include <linux/kernel.h> #include <linux/module.h> @@ -259,7 +255,6 @@ struct stfsm { struct device *dev; void __iomem *base; - struct resource *region; struct mtd_info mtd; struct mutex lock; struct flash_info *info; @@ -2120,10 +2115,12 @@ (long long)fsm->mtd.size, (long long)(fsm->mtd.size >> 20), fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10)); - return mtd_device_register(&fsm->mtd, NULL, 0); - + ret = mtd_device_register(&fsm->mtd, NULL, 0); + if (ret) { err_clk_unprepare: - clk_disable_unprepare(fsm->clk); + clk_disable_unprepare(fsm->clk); + } + return ret; } -- Gitblit v1.6.2