Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbdGaUJd (ORCPT ); Mon, 31 Jul 2017 16:09:33 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:16965 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbdGaUJc (ORCPT ); Mon, 31 Jul 2017 16:09:32 -0400 Subject: Re: [PATCH v2] soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create To: Keerthy Cc: ssantosh@kernel.org, m-karicheri2@ti.com, t-kristo@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1501475496-10267-1-git-send-email-j-keerthy@ti.com> From: Santosh Shilimkar Organization: Oracle Corporation Message-ID: <4f248ff1-9972-a519-f7ff-c540a7e9f71e@oracle.com> Date: Mon, 31 Jul 2017 13:09:42 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1501475496-10267-1-git-send-email-j-keerthy@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 437 Lines: 14 On 7/30/2017 9:31 PM, Keerthy wrote: > knav_pool_create is an exported function. In the event of a call > before knav_queue_probe, we encounter a NULL pointer dereference > in the following line. Hence return -EPROBE_DEFER to the caller till > the kdev pointer is non-NULL. > > Signed-off-by: Keerthy > --- > > Changes in v2: > > * Fixed returning an int to returning pointer. Thanks. Will add it to the queue.