Thread (4 messages) flat view 4 messages, 2 authors, 2007-11-23

Re: [PATCH] PPC: CHRP - fix possible NULL pointer dereference

From: Cyrill Gorcunov <hidden>
Date: 2007-11-23 04:24:07
Also in: lkml

On 11/23/07, Stephen Rothwell [off-list ref] wrote:
On Thu, 22 Nov 2007 22:54:23 +0300 Cyrill Gorcunov [off-list ref]
wrote:
quoted
This patch does fix possible NULL pointer dereference
inside of strncmp() if of_get_property() failed.
Thanks for this.
quoted
 static void __init sio_init(void)
 {
  struct device_node *root;
+ const char *model = NULL;
You don't need this initialization as you always assign the variable
before you use it.
quoted
+ root = of_find_node_by_path("/");
+ if (root) {
 if (!root)
  return;

would save a level of indentation. Not important.

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Oh my :) Thanks. I'll fix it and resend.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help