diff options
Diffstat (limited to 'drivers/s390/block/dasd_eer.c')
-rw-r--r-- | drivers/s390/block/dasd_eer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index 2d946b6ca074..da65f1b032f5 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c | |||
@@ -89,7 +89,7 @@ struct eerbuffer { | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | static LIST_HEAD(bufferlist); | 91 | static LIST_HEAD(bufferlist); |
92 | static spinlock_t bufferlock = SPIN_LOCK_UNLOCKED; | 92 | static DEFINE_SPINLOCK(bufferlock); |
93 | static DECLARE_WAIT_QUEUE_HEAD(dasd_eer_read_wait_queue); | 93 | static DECLARE_WAIT_QUEUE_HEAD(dasd_eer_read_wait_queue); |
94 | 94 | ||
95 | /* | 95 | /* |
@@ -276,7 +276,7 @@ struct dasd_eer_header { | |||
276 | __u64 tv_sec; | 276 | __u64 tv_sec; |
277 | __u64 tv_usec; | 277 | __u64 tv_usec; |
278 | char busid[DASD_EER_BUSID_SIZE]; | 278 | char busid[DASD_EER_BUSID_SIZE]; |
279 | }; | 279 | } __attribute__ ((packed)); |
280 | 280 | ||
281 | /* | 281 | /* |
282 | * The following function can be used for those triggers that have | 282 | * The following function can be used for those triggers that have |
@@ -521,6 +521,8 @@ static int dasd_eer_open(struct inode *inp, struct file *filp) | |||
521 | unsigned long flags; | 521 | unsigned long flags; |
522 | 522 | ||
523 | eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); | 523 | eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); |
524 | if (!eerb) | ||
525 | return -ENOMEM; | ||
524 | eerb->buffer_page_count = eer_pages; | 526 | eerb->buffer_page_count = eer_pages; |
525 | if (eerb->buffer_page_count < 1 || | 527 | if (eerb->buffer_page_count < 1 || |
526 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { | 528 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { |