diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-10 17:26:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-10 17:26:00 -0500 |
commit | 33175d84ee3fa29991adb80513683e010769e807 (patch) | |
tree | 3731f61cf82451b6892cf1368701e57e35d92908 /drivers/video/backlight/ltv350qv.c | |
parent | c5908939b2738bafe1b309bc2465cb9f2e6184c5 (diff) | |
parent | 6dfbd87a20a737641ef228230c77f4262434fa24 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x/bnx2x_cmn.c
Diffstat (limited to 'drivers/video/backlight/ltv350qv.c')
-rw-r--r-- | drivers/video/backlight/ltv350qv.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c index 8010aaeb5adb..dd0e84a9bd2f 100644 --- a/drivers/video/backlight/ltv350qv.c +++ b/drivers/video/backlight/ltv350qv.c | |||
@@ -239,11 +239,15 @@ static int __devinit ltv350qv_probe(struct spi_device *spi) | |||
239 | lcd->spi = spi; | 239 | lcd->spi = spi; |
240 | lcd->power = FB_BLANK_POWERDOWN; | 240 | lcd->power = FB_BLANK_POWERDOWN; |
241 | lcd->buffer = kzalloc(8, GFP_KERNEL); | 241 | lcd->buffer = kzalloc(8, GFP_KERNEL); |
242 | if (!lcd->buffer) { | ||
243 | ret = -ENOMEM; | ||
244 | goto out_free_lcd; | ||
245 | } | ||
242 | 246 | ||
243 | ld = lcd_device_register("ltv350qv", &spi->dev, lcd, <v_ops); | 247 | ld = lcd_device_register("ltv350qv", &spi->dev, lcd, <v_ops); |
244 | if (IS_ERR(ld)) { | 248 | if (IS_ERR(ld)) { |
245 | ret = PTR_ERR(ld); | 249 | ret = PTR_ERR(ld); |
246 | goto out_free_lcd; | 250 | goto out_free_buffer; |
247 | } | 251 | } |
248 | lcd->ld = ld; | 252 | lcd->ld = ld; |
249 | 253 | ||
@@ -257,6 +261,8 @@ static int __devinit ltv350qv_probe(struct spi_device *spi) | |||
257 | 261 | ||
258 | out_unregister: | 262 | out_unregister: |
259 | lcd_device_unregister(ld); | 263 | lcd_device_unregister(ld); |
264 | out_free_buffer: | ||
265 | kfree(lcd->buffer); | ||
260 | out_free_lcd: | 266 | out_free_lcd: |
261 | kfree(lcd); | 267 | kfree(lcd); |
262 | return ret; | 268 | return ret; |
@@ -268,6 +274,7 @@ static int __devexit ltv350qv_remove(struct spi_device *spi) | |||
268 | 274 | ||
269 | ltv350qv_power(lcd, FB_BLANK_POWERDOWN); | 275 | ltv350qv_power(lcd, FB_BLANK_POWERDOWN); |
270 | lcd_device_unregister(lcd->ld); | 276 | lcd_device_unregister(lcd->ld); |
277 | kfree(lcd->buffer); | ||
271 | kfree(lcd); | 278 | kfree(lcd); |
272 | 279 | ||
273 | return 0; | 280 | return 0; |