From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Dan Carpenter" , "Greg Kroah-Hartman" Date: Tue, 17 Feb 2015 01:46:53 +0000 Message-ID: Subject: [PATCH 3.2 041/152] USB: adutux: NULL dereferences on disconnect In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.2.67-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit fc625960edecfb57e62c2975d1f155155e28e6ba upstream. Both "dev->udev" and "interface->dev" are NULL. These printks are not very interesting so I just deleted them. Fixes: 03270634e242 ('USB: Add ADU support for Ontrak ADU devices') Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c @@ -865,15 +865,11 @@ static void adu_disconnect(struct usb_in usb_set_intfdata(interface, NULL); /* if the device is not opened, then we clean up right now */ - dbg(2," %s : open count %d", __func__, dev->open_count); if (!dev->open_count) adu_delete(dev); mutex_unlock(&adutux_mutex); - dev_info(&interface->dev, "ADU device adutux%d now disconnected\n", - (minor - ADU_MINOR_BASE)); - dbg(2," %s : leave", __func__); }