On Thu, 22 Nov 2007 22:54:23 +0300 Cyrill Gorcunov <[email protected]> wrote: > > This patch does fix possible NULL pointer dereference > inside of strncmp() if of_get_property() failed. Thanks for this. > 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. > + root = of_find_node_by_path("/"); > + if (root) { if (!root) return; would save a level of indentation. Not important. -- Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Attachment:
pgputZSQ3HxXJ.pgp
Description: PGP signature
- Follow-Ups:
- Re: [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- From: "Cyrill Gorcunov" <[email protected]>
- Re: [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- From: "Cyrill Gorcunov" <[email protected]>
- Re: [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- References:
- [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- From: Cyrill Gorcunov <[email protected]>
- [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- Prev by Date: Re: [PATCH 2/9]: Reduce Log I/O latency
- Next by Date: NET: dmfe.c : fix access to card's pci config space in D3
- Previous by thread: [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- Next by thread: Re: [PATCH] PPC: CHRP - fix possible NULL pointer dereference
- Index(es):