From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH] cgroup: remove redundant check Date: Thu, 20 Dec 2012 11:18:03 -0800 Message-ID: <20121220191803.GA14527@htj.dyndns.org> References: <1356030701-16284-1-git-send-email-sasha.levin@oracle.com> <1356030701-16284-23-git-send-email-sasha.levin@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Sasha Levin Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On Thu, Dec 20, 2012 at 02:11:31PM -0500, Sasha Levin wrote: > We already know that 'event' is non-NULL, remove the redundant check. > > Signed-off-by: Sasha Levin I don't know. I kinda like that test there. It's not an error path and tearing down everything which could have been allocated. If the test not being used is bothering, convert return -ENOMEM to goto fail? -- tejun