Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbcDMRCp (ORCPT ); Wed, 13 Apr 2016 13:02:45 -0400 Received: from mail.kernel.org ([198.145.29.136]:35116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbcDMRCo (ORCPT ); Wed, 13 Apr 2016 13:02:44 -0400 Date: Wed, 13 Apr 2016 10:02:40 -0700 From: Shaohua Li To: Dan Carpenter Cc: Krzysztof Wojcik , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] md/raid0: check for create_strip_zones() errors Message-ID: <20160413170240.GB6186@kernel.org> References: <20160413064645.GH8092@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160413064645.GH8092@mwanda> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 435 Lines: 11 On Wed, Apr 13, 2016 at 09:46:45AM +0300, Dan Carpenter wrote: > My static checker complains that if create_strip_zones() fails then we > use "priv_conf" without initializing it. Fix this by checking for > failure. It's more convenient setting '*private_conf = ERR_PTR(-ENOMEM);' at the begining of create_strip_zones() when it returns -ENOMEM. create_strip_zones already sets private_conf correctly in other cases. Thanks, Shaohua