|
@@ -873,6 +873,8 @@ struct fb_info {
|
|
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
|
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
|
struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
|
|
struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
|
|
+ max_num * sizeof(struct aperture), GFP_KERNEL);
|
|
+ max_num * sizeof(struct aperture), GFP_KERNEL);
|
|
|
|
+ if (!a)
|
|
|
|
+ return NULL;
|
|
a->count = max_num;
|
|
a->count = max_num;
|
|
return a;
|
|
return a;
|
|
}
|
|
}
|