Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: sunxi: sram: Return void from the release function

There is no point in returning an error here, as the caller can do
nothing about it. In fact, all callers already ignore the return value.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20220815041248.53268-8-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

authored by

Samuel Holland and committed by
Jernej Skrabec
460d9cb6 e3c95edb

+4 -6
+3 -5
drivers/soc/sunxi/sunxi_sram.c
··· 261 261 } 262 262 EXPORT_SYMBOL(sunxi_sram_claim); 263 263 264 - int sunxi_sram_release(struct device *dev) 264 + void sunxi_sram_release(struct device *dev) 265 265 { 266 266 const struct sunxi_sram_data *sram_data; 267 267 struct sunxi_sram_desc *sram_desc; 268 268 269 269 if (!dev || !dev->of_node) 270 - return -EINVAL; 270 + return; 271 271 272 272 sram_data = sunxi_sram_of_parse(dev->of_node, NULL); 273 273 if (IS_ERR(sram_data)) 274 - return -EINVAL; 274 + return; 275 275 276 276 sram_desc = to_sram_desc(sram_data); 277 277 278 278 spin_lock(&sram_lock); 279 279 sram_desc->claimed = false; 280 280 spin_unlock(&sram_lock); 281 - 282 - return 0; 283 281 } 284 282 EXPORT_SYMBOL(sunxi_sram_release); 285 283
+1 -1
include/linux/soc/sunxi/sunxi_sram.h
··· 14 14 #define _SUNXI_SRAM_H_ 15 15 16 16 int sunxi_sram_claim(struct device *dev); 17 - int sunxi_sram_release(struct device *dev); 17 + void sunxi_sram_release(struct device *dev); 18 18 19 19 #endif /* _SUNXI_SRAM_H_ */