From: Oleg Nesterov Date: Mon, 22 Sep 2008 21:42:49 +0000 (-0700) Subject: posix-timers: sys_timer_create: cleanup the error handling X-Git-Tag: v2.6.28-rc1~82^2^5~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef864c958801768fb28bd3603cd0b098b394671c;p=pandora-kernel.git posix-timers: sys_timer_create: cleanup the error handling Cleanup. - sys_timer_create() is big and complicated. The code above the "out:" label relies on the fact that "error" must be == 0. This is not very robust, make the code more explicit. Remove the unneeded initialization of error. - If idr_get_new() succeeds (as it normally should), we check the returned value twice. Move the "-EAGAIN" check under "if (error)". Signed-off-by: Oleg Nesterov Cc: mingo@elte.hu Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed