From 4eb1fe129abda6e6e45746b7cdc8b35c243656ce Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 19 Nov 2008 17:09:55 +0000 Subject: From cede5c6c9b06ecbb0f7f2df7b7070092b87ddaf8 Mon Sep 17 00:00:00 2001 Subject: [PATCH] [pcf50633] Avoid ooops on start with inserted usb cable The pcf50633_global might not be initialized when we get the first usb interrupt. We would oops inside the dev_err because we made up a struct device. Signed-Off-By: Holger Freyther --- drivers/i2c/chips/pcf50633.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/i2c') diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index ead4273b17f..76bb886512c 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -690,9 +690,7 @@ int pcf50633_notify_usb_current_limit_change(struct pcf50633_data *pcf, * have to bail with error since we can't even schedule the work */ if (!pcf) { - dev_err(&pcf->client.dev, - "pcf50633_notify_usb_current_limit_change " - "called with NULL pcf\n"); + printk(KERN_ERR "pcf50633_notify_usb_current_limit called with NULL pcf\n"); return -EBUSY; } -- cgit v1.2.3