diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpiolib.c | 3 | ||||
-rw-r--r-- | drivers/leds/led-class.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-rs5c372.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi.c | 3 | ||||
-rw-r--r-- | drivers/video/backlight/cr_bllcd.c | 1 |
5 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 21da9c19a0cb..649550e2cae9 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -1281,6 +1281,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) | |||
1281 | err = gpio_direction_output(gpio, | 1281 | err = gpio_direction_output(gpio, |
1282 | (flags & GPIOF_INIT_HIGH) ? 1 : 0); | 1282 | (flags & GPIOF_INIT_HIGH) ? 1 : 0); |
1283 | 1283 | ||
1284 | if (err) | ||
1285 | gpio_free(gpio); | ||
1286 | |||
1284 | return err; | 1287 | return err; |
1285 | } | 1288 | } |
1286 | EXPORT_SYMBOL_GPL(gpio_request_one); | 1289 | EXPORT_SYMBOL_GPL(gpio_request_one); |
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index 211e21f34bd5..d5a4ade88991 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c | |||
@@ -267,7 +267,7 @@ void led_blink_set(struct led_classdev *led_cdev, | |||
267 | unsigned long *delay_off) | 267 | unsigned long *delay_off) |
268 | { | 268 | { |
269 | if (led_cdev->blink_set && | 269 | if (led_cdev->blink_set && |
270 | led_cdev->blink_set(led_cdev, delay_on, delay_off)) | 270 | !led_cdev->blink_set(led_cdev, delay_on, delay_off)) |
271 | return; | 271 | return; |
272 | 272 | ||
273 | /* blink with 1 Hz as default if nothing specified */ | 273 | /* blink with 1 Hz as default if nothing specified */ |
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 90cf0a6ff23e..dd14e202c2c8 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c | |||
@@ -207,7 +207,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm) | |||
207 | static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) | 207 | static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm) |
208 | { | 208 | { |
209 | struct rs5c372 *rs5c = i2c_get_clientdata(client); | 209 | struct rs5c372 *rs5c = i2c_get_clientdata(client); |
210 | unsigned char buf[8]; | 210 | unsigned char buf[7]; |
211 | int addr; | 211 | int addr; |
212 | 212 | ||
213 | dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d " | 213 | dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d " |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 709c836607de..b02d0cbce890 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -584,8 +584,7 @@ void spi_unregister_master(struct spi_master *master) | |||
584 | list_del(&master->list); | 584 | list_del(&master->list); |
585 | mutex_unlock(&board_lock); | 585 | mutex_unlock(&board_lock); |
586 | 586 | ||
587 | dummy = device_for_each_child(master->dev.parent, &master->dev, | 587 | dummy = device_for_each_child(&master->dev, NULL, __unregister); |
588 | __unregister); | ||
589 | device_unregister(&master->dev); | 588 | device_unregister(&master->dev); |
590 | } | 589 | } |
591 | EXPORT_SYMBOL_GPL(spi_unregister_master); | 590 | EXPORT_SYMBOL_GPL(spi_unregister_master); |
diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c index a4f4546f0be0..397d15eb1ea8 100644 --- a/drivers/video/backlight/cr_bllcd.c +++ b/drivers/video/backlight/cr_bllcd.c | |||
@@ -242,6 +242,7 @@ static int cr_backlight_remove(struct platform_device *pdev) | |||
242 | backlight_device_unregister(crp->cr_backlight_device); | 242 | backlight_device_unregister(crp->cr_backlight_device); |
243 | lcd_device_unregister(crp->cr_lcd_device); | 243 | lcd_device_unregister(crp->cr_lcd_device); |
244 | pci_dev_put(lpc_dev); | 244 | pci_dev_put(lpc_dev); |
245 | kfree(crp); | ||
245 | 246 | ||
246 | return 0; | 247 | return 0; |
247 | } | 248 | } |