X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=inline;f=drivers%2Fvideo%2Fconsole%2Fsoftcursor.c;h=2ade7529178eed13137a28af44186c2e2528f02e;hb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;hp=0a2ed2fd3341836ad84f8836e31c7b087f19aef6;hpb=16cf0ec7408f389279d413869e94c1a351392f97;p=linux-2.6.git diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 0a2ed2fd3..2ade75291 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -27,7 +27,7 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) struct fb_image *image; u8 *dst; static u8 *src=NULL; - static int allocsize=0; + static int allocsize = 0; if (info->state != FBINFO_STATE_RUNNING) return 0; @@ -41,8 +41,10 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) allocsize = dsize + sizeof(struct fb_image); src = kmalloc(allocsize, GFP_ATOMIC); - if (!src) + if (!src) { + allocsize = 0; return -ENOMEM; + } } image = (struct fb_image *) (src + dsize);