From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754612AbcDMRy0 (ORCPT ); Wed, 13 Apr 2016 13:54:26 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:39692 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753165AbcDMRyY (ORCPT ); Wed, 13 Apr 2016 13:54:24 -0400 Date: Wed, 13 Apr 2016 20:53:57 +0300 From: Dan Carpenter To: Shaohua Li 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: <20160413175356.GE4247@mwanda> References: <20160413064645.GH8092@mwanda> <20160413170240.GB6186@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160413170240.GB6186@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2016 at 10:02:40AM -0700, Shaohua Li wrote: > 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. > Yeah. I'll send v2. regards, dan carpenter