|
@@ -808,6 +808,11 @@ static int sony_nc_handles_cleanup(struct platform_device *pd)
|
|
static int sony_find_snc_handle(int handle)
|
|
static int sony_find_snc_handle(int handle)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
+
|
|
|
|
+ /* not initialized yet, return early */
|
|
|
|
+ if (!handles)
|
|
|
|
+ return -1;
|
|
|
|
+
|
|
for (i = 0; i < 0x10; i++) {
|
|
for (i = 0; i < 0x10; i++) {
|
|
if (handles->cap[i] == handle) {
|
|
if (handles->cap[i] == handle) {
|
|
dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
|
|
dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
|