Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbbK2RDK (ORCPT ); Sun, 29 Nov 2015 12:03:10 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:40047 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558AbbK2RDI (ORCPT ); Sun, 29 Nov 2015 12:03:08 -0500 Date: Sun, 29 Nov 2015 18:03:03 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: LABBE Corentin Cc: gregkh@linuxfoundation.org, jslaby@suse.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v2 1/1] serial: imx: fix a possible NULL dereference Message-ID: <20151129170303.GD10431@pengutronix.de> References: <1448375817-16189-1-git-send-email-clabbe.montjoie@gmail.com> <1448375817-16189-2-git-send-email-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1448375817-16189-2-git-send-email-clabbe.montjoie@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 848 Lines: 21 On Tue, Nov 24, 2015 at 03:36:57PM +0100, LABBE Corentin wrote: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. > Even if the probability of this case is very low, fixing it made > static analyzers happy. > Solving this with of_device_get_match_data made also code simplier. > > Signed-off-by: LABBE Corentin Acked-by: Uwe Kleine-K?nig Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/