From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937003AbdEXIJ2 (ORCPT ); Wed, 24 May 2017 04:09:28 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:38456 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933663AbdEXIIu (ORCPT ); Wed, 24 May 2017 04:08:50 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Wed, 24 May 2017 09:09:51 +0100 From: Charles Keepax To: Lee Jones CC: "Gustavo A. R. Silva" , , Subject: Re: [mfd] question about potential null pointer dereference Message-ID: <20170524080951.GO1594@localhost.localdomain> References: <20170523163341.Horde.9ys90CmTnWtlq_NxAO5TqfN@gator4166.hostgator.com> <20170524072258.7qnnnrdodjwc55lk@dell> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170524072258.7qnnnrdodjwc55lk@dell> 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-1705240038 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 24, 2017 at 08:22:58AM +0100, Lee Jones wrote: > On Tue, 23 May 2017, Gustavo A. R. Silva wrote: > > The issue here is that there is a potential NULL pointer dereference at line > > 37, in case function of_match_device() returns NULL. > > > > Maybe a patch like the following could be applied in order to avoid any > > chance of a NULL pointer dereference: > > I do not believe it's possible for of_match_device() to return NULL in > this case. > > However, if you wanted to submit a patch checking for it, it would not > be rejected. Personally I would prefer to have a NULL pointer check in there. Thanks, Charles