From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755652AbbEUNV7 (ORCPT ); Thu, 21 May 2015 09:21:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754519AbbEUNV6 (ORCPT ); Thu, 21 May 2015 09:21:58 -0400 Date: Thu, 21 May 2015 15:21:56 +0200 From: Jan Kara To: Dan Carpenter Cc: Jan Kara , Fabian Frederick , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] udf: fix udf_load_pvoldesc() Message-ID: <20150521132156.GG27863@quack.suse.cz> References: <20150520081315.GA21948@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150520081315.GA21948@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 20-05-15 11:13:15, Dan Carpenter wrote: > There are some missing braces here which means this function never > succeeds. > > Fixes: e9d4cf411f75 ('udf: improve error management in udf_CS0toUTF8()') > Signed-off-by: Dan Carpenter Thanks for the patch. Added to my tree. Actually, the missing parenthesis don't cause any real issues since almost all volumes have volIdent and thus ret gets set to 0 in the previous if. But it's certainly good to fix. Honza > diff --git a/fs/udf/super.c b/fs/udf/super.c > index c6a8f5f..b96f190 100644 > --- a/fs/udf/super.c > +++ b/fs/udf/super.c > @@ -937,12 +937,13 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block) > udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident); > } > > - if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) > + if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128)) { > ret = udf_CS0toUTF8(outstr, instr); > if (ret < 0) > goto out_bh; > > udf_debug("volSetIdent[] = '%s'\n", outstr->u_name); > + } > > ret = 0; > out_bh: -- Jan Kara SUSE Labs, CR