From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Subject: Re: [PATCH] net/can: add driver for mscan family & mpc52xx_mscan Date: Tue, 17 Nov 2009 20:17:55 +0100 Message-ID: <4B02F6E3.6000503@grandegger.com> References: <1258128892-28800-1-git-send-email-w.sang@pengutronix.de> <20091116184416.GA21491@pengutronix.de> <4B02EABA.3060905@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Grant Likely , socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Miller , linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Wolfram Sang Return-path: In-Reply-To: <4B02EABA.3060905-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org Wolfgang Grandegger wrote: > Wolfram Sang wrote: >> Hi Grant, >> >> Wolfgang commented on some points already, I will pick up the other remarks, >> just one question: >> >>>> + clk_src = of_get_property(np, "fsl,mscan-clk-src", NULL); >>>> + if (clk_src && strcmp(clk_src, "ip") == 0) >>> Should protect against non-null. strncmp() maybe? >> "ip" is null-terminated, or what do you mean? > > Imagine somebody defines: > > fsl,mscan-clk-src = <0xbaeee>; Forget my comment. I will not harm in the above case. I was just worried about non-null-teminated strings. Wolfgang.