Re: [PATCH 1/2] [W1] ds1wm: should check for IS_ERR(clk) instead of NULL

2008-02-25 Thread Evgeniy Polyakov
Hi Anton. On Tue, Feb 26, 2008 at 12:24:26AM +0300, Anton Vorontsov ([EMAIL PROTECTED]) wrote: > On the error condition clk_get() returns ERR_PTR(..), so checking > for NULL doesn't work. ds1wm module causes a kernel oops when ds1wm > clock isn't registered. > > This patch converts NULL check to

[PATCH 1/2] [W1] ds1wm: should check for IS_ERR(clk) instead of NULL

2008-02-25 Thread Anton Vorontsov
On the error condition clk_get() returns ERR_PTR(..), so checking for NULL doesn't work. ds1wm module causes a kernel oops when ds1wm clock isn't registered. This patch converts NULL check to IS_ERR(), plus uses PTR_ERR() for the return code. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> ---