diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
commit | d635711daa98be86d4c7fd01499c34f566b54ccb (patch) | |
tree | aa5cc3760a27c3d57146498cb82fa549547de06c /drivers/video/fbdev/n411.c | |
parent | c91265cd0efb83778f015b4d4b1129bd2cfd075e (diff) |
Linux-libre 4.6.2-gnu
Diffstat (limited to 'drivers/video/fbdev/n411.c')
-rw-r--r-- | drivers/video/fbdev/n411.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/video/fbdev/n411.c b/drivers/video/fbdev/n411.c index 935830fea..053deacad 100644 --- a/drivers/video/fbdev/n411.c +++ b/drivers/video/fbdev/n411.c @@ -165,16 +165,22 @@ static int __init n411_init(void) if (!n411_device) return -ENOMEM; - platform_device_add_data(n411_device, &n411_board, sizeof(n411_board)); + ret = platform_device_add_data(n411_device, &n411_board, + sizeof(n411_board)); + if (ret) + goto put_plat_device; /* this _add binds hecubafb to n411. hecubafb refcounts n411 */ ret = platform_device_add(n411_device); if (ret) - platform_device_put(n411_device); + goto put_plat_device; - return ret; + return 0; +put_plat_device: + platform_device_put(n411_device); + return ret; } static void __exit n411_exit(void) |