[ATM] firestream: handle thrown error
[linux-block.git] / drivers / atm / firestream.c
index 40ab9b65fae9ecc57aeea36a35b99cd0b38bedac..697ad82f6634e2f74e4c3298d17f6ac13d0162cc 100644 (file)
@@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_vcc)
                                        r = ROUND_UP;
                                }
                                error = make_rate (pcr, r, &tmc0, NULL);
+                               if (error) {
+                                       kfree(tc);
+                                       return error;
+                               }
                        }
                        fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
                }