diff options
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index e642f5f29504..33c3b8c066ee 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -808,6 +808,11 @@ static int sony_nc_handles_cleanup(struct platform_device *pd) | |||
808 | static int sony_find_snc_handle(int handle) | 808 | static int sony_find_snc_handle(int handle) |
809 | { | 809 | { |
810 | int i; | 810 | int i; |
811 | |||
812 | /* not initialized yet, return early */ | ||
813 | if (!handles) | ||
814 | return -1; | ||
815 | |||
811 | for (i = 0; i < 0x10; i++) { | 816 | for (i = 0; i < 0x10; i++) { |
812 | if (handles->cap[i] == handle) { | 817 | if (handles->cap[i] == handle) { |
813 | dprintk("found handle 0x%.4x (offset: 0x%.2x)\n", | 818 | dprintk("found handle 0x%.4x (offset: 0x%.2x)\n", |