mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
Reset controller fixes for v6.2
Avoid a build error by disabling the invalid combination of building reset-ti-sci built-in but ti-sci as a module. Fix a possible NULL pointer dereference in reset-uniphier-glue in case platform_get_resource() fails. -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCY7VMThcccC56YWJlbEBw ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwDBIAQCh6Cc1gJtYi08WbF3nGB3ojKAz +ciz6F8gBhXMphCahAEAoFpMjiIjkxvN5e1E+Rvxix5DzUJoteVtE1fIOtrNjAg= =PQAz -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmO8kikACgkQmmx57+YA GNktLQ//SdDorslDy/GfR46tZddaruMo3AXQ84zOjVz0cQOH613nTE5P487b8+y+ h+MIW6KJQNgwLi7zLAF0SVZjV50LkF7ic52IyZlaVbri6sMsoVEm0jIp8UWVy5bU JV23VWd4kpgoNvK6b0QlhrytU3AVV1oZfbK+PJoINMPZUM76qwKijASH0778c7AF jWrPQE3jCQ4UqudfBq8PAcu/j5ALp4GKkWSIiqFlesho/lCG+Ycto0tTPUfPDCFL lmv2sdiUIv5X5Y/MkB99DH/nTY81LlmIs3KHD22QYMDrqE6R2vX3OiQ/bfKcCvPg KAA96+XLXuWUZAc3ldJIDAZ++fsEFvyPLAg74uFZVgqcUEFYoh07WOVJpAbTYOSN kJ49k+LtI/58iOoekjj+/95/pD3lg5HE87N2XIw199AhA8fIW+oKIrq7aYlECHjS FN7871/Jtt45QACYCmtWM0YmDmRI1gaGLbXRdvEtyK4U5h4nh8HRkxdVk+DcB83W 2glSqpgIPnKtqgDSg/14dv4p5BaLd5v8Cm6GFavfAGBJSrHBr2ZFguV74i9ixVUJ AoXFlguO0G1OrYsfppW7bF1ThgebBV88F4ESxeLyWnP4VOhnJdo8Yg1i/2FQyN+q iPIvlDOpBFuOyMqIZhYeSe/hCroZ3OWA2xhv2B32g/m1HK/HCIk= =Q4/c -----END PGP SIGNATURE----- Merge tag 'reset-fixes-for-v6.2' of git://git.pengutronix.de/pza/linux into arm/fixes Reset controller fixes for v6.2 Avoid a build error by disabling the invalid combination of building reset-ti-sci built-in but ti-sci as a module. Fix a possible NULL pointer dereference in reset-uniphier-glue in case platform_get_resource() fails. * tag 'reset-fixes-for-v6.2' of git://git.pengutronix.de/pza/linux: reset: uniphier-glue: Fix possible null-ptr-deref reset: ti-sci: honor TI_SCI_PROTOCOL setting when not COMPILE_TEST Link: https://lore.kernel.org/r/20230104095855.3809733-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
97bcdf24e0
2 changed files with 2 additions and 4 deletions
|
@ -257,7 +257,7 @@ config RESET_SUNXI
|
|||
|
||||
config RESET_TI_SCI
|
||||
tristate "TI System Control Interface (TI-SCI) reset driver"
|
||||
depends on TI_SCI_PROTOCOL || COMPILE_TEST
|
||||
depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)
|
||||
help
|
||||
This enables the reset driver support over TI System Control Interface
|
||||
available on some new TI's SoCs. If you wish to use reset resources
|
||||
|
|
|
@ -47,7 +47,6 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
|
|||
struct device *dev = &pdev->dev;
|
||||
struct uniphier_glue_reset_priv *priv;
|
||||
struct resource *res;
|
||||
resource_size_t size;
|
||||
int i, ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
|
@ -60,7 +59,6 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
size = resource_size(res);
|
||||
priv->rdata.membase = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR(priv->rdata.membase))
|
||||
return PTR_ERR(priv->rdata.membase);
|
||||
|
@ -96,7 +94,7 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
|
|||
|
||||
spin_lock_init(&priv->rdata.lock);
|
||||
priv->rdata.rcdev.owner = THIS_MODULE;
|
||||
priv->rdata.rcdev.nr_resets = size * BITS_PER_BYTE;
|
||||
priv->rdata.rcdev.nr_resets = resource_size(res) * BITS_PER_BYTE;
|
||||
priv->rdata.rcdev.ops = &reset_simple_ops;
|
||||
priv->rdata.rcdev.of_node = dev->of_node;
|
||||
priv->rdata.active_low = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue