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 19:26:02 +0100 Message-ID: <4B02EABA.3060905@grandegger.com> References: <1258128892-28800-1-git-send-email-w.sang@pengutronix.de> <20091116184416.GA21491@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Grant Likely , socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, David Miller , linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang Return-path: In-Reply-To: <20091116184416.GA21491-bIcnvbaLZ9MEGnE8C9+IrQ@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 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>; Wolfgang.