Message ID | Pine.LNX.4.64.0909111821180.10552@pc-004.diku.dk (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index 2eb9dc2..0d17ce5 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c @@ -132,7 +132,7 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) buf = kzalloc(sizeof(struct hdpvr_buffer), GFP_KERNEL); if (!buf) { v4l2_err(&dev->v4l2_dev, "cannot allocate buffer\n"); - goto exit; + goto exit_nobuf; } buf->dev = dev; @@ -162,6 +162,8 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) } return 0; exit: + kfree(buf); +exit_nobuf: hdpvr_free_buffers(dev); return retval; }