Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1170386AbdDXM7r (ORCPT ); Mon, 24 Apr 2017 08:59:47 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:45177 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1170474AbdDXM7f (ORCPT ); Mon, 24 Apr 2017 08:59:35 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Mon, 24 Apr 2017 14:00:39 +0100 From: Charles Keepax To: SF Markus Elfring CC: , Chanwoo Choi , MyungJoo Ham , LKML , Subject: Re: [PATCH 3/3] extcon: arizona: Use devm_kcalloc() in arizona_extcon_get_micd_configs() Message-ID: <20170424130039.GG1594@localhost.localdomain> References: <1a203761-76b9-bf3c-c034-0bb81fe6006a@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1a203761-76b9-bf3c-c034-0bb81fe6006a@users.sourceforge.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704240229 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 785 Lines: 22 On Mon, Apr 24, 2017 at 02:43:55PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 23 Apr 2017 22:44:19 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "devm_kcalloc". > > * Replace the specification of a data structure by a pointer dereference > to make the corresponding size determination a bit safer according to > the Linux coding style convention. > > Signed-off-by: Markus Elfring > --- Reviewed-by: Charles Keepax Actually fixes a bug on the alloc as well looks like the type was wrong before. Thanks, Charles