ipmi: Fix NULL pointer dereference in ssif_probe
[muen/linux.git] / drivers / char / ipmi / ipmi_ssif.c
index 265d6a6583bc547971ad41e009906f5c95163b65..29e67a80fb208f804e4ed1fb0a560142002c7ffc 100644 (file)
@@ -1643,7 +1643,9 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
  out:
        if (rv) {
-               addr_info->client = NULL;
+               if (addr_info)
+                       addr_info->client = NULL;
+
                dev_err(&client->dev, "Unable to start IPMI SSIF: %d\n", rv);
                kfree(ssif_info);
        }