From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbbIARUc (ORCPT ); Tue, 1 Sep 2015 13:20:32 -0400 Received: from casper.infradead.org ([85.118.1.10]:47254 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbbIARUa (ORCPT ); Tue, 1 Sep 2015 13:20:30 -0400 Message-ID: <1441128024.29534.32.camel@infradead.org> Subject: Re: [PATCH] ps3-vuart: BUG_ON on null drv before dereferencing it on dev_dbg From: Geoff Levand To: Colin King Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Tue, 01 Sep 2015 10:20:24 -0700 In-Reply-To: <1441102876-26978-1-git-send-email-colin.king@canonical.com> References: <1441102876-26978-1-git-send-email-colin.king@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-09-01 at 11:21 +0100, Colin King wrote: > On the unlikely event that drv is null, the current code will > perform a null pointer dereference with it when printing a dev_dbg > message. Instead, the BUG_ON check on drv should be performed > before we emit the dev_dbg message. > > Signed-off-by: Colin Ian King I applied this to my ps3-linux repo. I can update it if you decide to do the other fixes Geert mentioned. -Geoff