-LINUX_VERSION-5.15 = .181
-LINUX_KERNEL_HASH-5.15.181 = 3346436d9efae810195b40922c6b73001d1a4dd7e5eeb5a7e8ed85e63960da38
+LINUX_VERSION-5.15 = .182
+LINUX_KERNEL_HASH-5.15.182 = b6abfa53315a04e459070b927c58beb41f085433117d58756504d68b67f6a31e
--- a/drivers/net/phy/microchip.c
+++ b/drivers/net/phy/microchip.c
-@@ -233,6 +233,7 @@ static int lan88xx_probe(struct phy_devi
+@@ -192,6 +192,7 @@ static int lan88xx_probe(struct phy_devi
struct device *dev = &phydev->mdio.dev;
struct lan88xx_priv *priv;
u32 led_modes[4];
int len;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-@@ -262,6 +263,32 @@ static int lan88xx_probe(struct phy_devi
+@@ -221,6 +222,32 @@ static int lan88xx_probe(struct phy_devi
return -EINVAL;
}
return -ENODEV;
/* Name & Type */
-@@ -372,7 +372,7 @@ int of_device_uevent_modalias(struct dev
+@@ -373,7 +373,7 @@ int of_device_uevent_modalias(struct dev
{
int sl;
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
-@@ -381,6 +381,8 @@ int of_device_uevent_modalias(struct dev
+@@ -382,6 +382,8 @@ int of_device_uevent_modalias(struct dev
sl = of_device_get_modalias(dev, &env->buf[env->buflen-1],
sizeof(env->buf) - env->buflen);
{
const char *compat;
char *c;
-@@ -249,19 +249,16 @@ static ssize_t of_device_get_modalias(st
+@@ -249,20 +249,17 @@ static ssize_t of_device_get_modalias(st
ssize_t csize;
ssize_t tsize;
+ csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
+ of_node_get_device_type(np));
tsize = csize;
+ if (csize >= len)
+ csize = len > 0 ? len - 1 : 0;
len -= csize;
- if (str)
- str += csize;
+ str += csize;
- of_property_for_each_string(dev->of_node, "compatible", p, compat) {
+ of_property_for_each_string(np, "compatible", p, compat) {
csize = strlen(compat) + 1;
tsize += csize;
- if (csize > len)
-@@ -286,7 +283,10 @@ int of_device_request_module(struct devi
+ if (csize >= len)
+@@ -287,7 +284,10 @@ int of_device_request_module(struct devi
ssize_t size;
int ret;
if (size < 0)
return size;
-@@ -297,7 +297,7 @@ int of_device_request_module(struct devi
+@@ -298,7 +298,7 @@ int of_device_request_module(struct devi
if (!str)
return -ENOMEM;
str[size - 1] = '\0';
ret = request_module(str);
kfree(str);
-@@ -314,7 +314,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
+@@ -315,7 +315,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
*/
ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
{
if (sl < 0)
return sl;
if (sl > len - 2)
-@@ -379,8 +384,8 @@ int of_device_uevent_modalias(struct dev
+@@ -380,8 +385,8 @@ int of_device_uevent_modalias(struct dev
if (add_uevent_var(env, "MODALIAS="))
return -ENOMEM;
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_device.h>
-@@ -241,42 +240,6 @@ const void *of_device_get_match_data(con
+@@ -241,43 +240,6 @@ const void *of_device_get_match_data(con
}
EXPORT_SYMBOL(of_device_get_match_data);
- csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
- of_node_get_device_type(np));
- tsize = csize;
+- if (csize >= len)
+- csize = len > 0 ? len - 1 : 0;
- len -= csize;
-- if (str)
-- str += csize;
+- str += csize;
-
- of_property_for_each_string(np, "compatible", p, compat) {
- csize = strlen(compat) + 1;
- tsize += csize;
-- if (csize > len)
+- if (csize >= len)
- continue;
-
- csize = snprintf(str, len, "C%s", compat);
char *str;
--- /dev/null
+++ b/drivers/of/module.c
-@@ -0,0 +1,44 @@
+@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Linux kernel module helpers.
+ csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
+ of_node_get_device_type(np));
+ tsize = csize;
++ if (csize >= len)
++ csize = len > 0 ? len - 1 : 0;
+ len -= csize;
-+ if (str)
-+ str += csize;
++ str += csize;
+
+ of_property_for_each_string(np, "compatible", p, compat) {
+ csize = strlen(compat) + 1;
+ tsize += csize;
-+ if (csize > len)
++ if (csize >= len)
+ continue;
+
+ csize = snprintf(str, len, "C%s", compat);
#include <linux/slab.h>
#include <linux/string.h>
-@@ -42,3 +43,32 @@ ssize_t of_modalias(const struct device_
+@@ -43,3 +44,32 @@ ssize_t of_modalias(const struct device_
return tsize;
}