From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759270AbbFBNpF (ORCPT ); Tue, 2 Jun 2015 09:45:05 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:40217 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758926AbbFBNoz (ORCPT ); Tue, 2 Jun 2015 09:44:55 -0400 Message-ID: <556DB350.4000803@roeck-us.net> Date: Tue, 02 Jun 2015 06:44:48 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Johannes Thumshirn , Wim Van Sebroeck CC: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog: mena21_wdt: Fix possible NULL pointer dereference References: <1433240726-7031-1-git-send-email-jthumshirn@suse.de> In-Reply-To: <1433240726-7031-1-git-send-email-jthumshirn@suse.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/02/2015 03:25 AM, Johannes Thumshirn wrote: > In a21_wdt_remove() we do a watchdog_unregister_device() on struct > a21_wdt_drv->wdt but never assign it. > > Also move the dev_set_drvdata() call in front of the watchdog_register_device() > call, so it doesn't look like an error. > > Signed-off-by: Johannes Thumshirn Good catch. Reviewed-by: Guenter Roeck Guenter