Re: [PATCH] net: encx24j600: check error in devm_regmap_init_encx24j600

From
Jakub Kicinski <kuba@kernel.org>
Date
2021-10-13 23:22:15
Also in
lkml
Reply to
Nanyong Sun, 2021-10-12
On Tue, 12 Oct 2021 20:59:01 +0800 Nanyong Sun wrote:
devm_regmap_init may return error which caused by like out of memory,
this will results in null pointer dereference later when reading
or writing register:
Applied, but...

quoted hunk ↗ jump to hunk
-void devm_regmap_init_encx24j600(struct device *dev,
+int devm_regmap_init_encx24j600(struct device *dev,
 				 struct encx24j600_context *ctx)
quoted hunk ↗ jump to hunk
-void devm_regmap_init_encx24j600(struct device *dev,
+int devm_regmap_init_encx24j600(struct device *dev,
 				 struct encx24j600_context *ctx);
.. please make sure you adjust the continuation lines.
checkpatch points this out.
Thread (2 messages) 2 messages, 2 authors, last reply 2021-10-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help