File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1539,7 +1539,7 @@ static int __init ccio_probe(struct parisc_device *dev)
1539
1539
ioc = kzalloc (sizeof (struct ioc ), GFP_KERNEL );
1540
1540
if (ioc == NULL ) {
1541
1541
printk (KERN_ERR MODULE_NAME ": memory allocation failure\n" );
1542
- return 1 ;
1542
+ return - ENOMEM ;
1543
1543
}
1544
1544
1545
1545
ioc -> name = dev -> id .hversion == U2_IOA_RUNWAY ? "U2" : "UTurn" ;
@@ -1554,6 +1554,10 @@ static int __init ccio_probe(struct parisc_device *dev)
1554
1554
1555
1555
ioc -> hw_path = dev -> hw_path ;
1556
1556
ioc -> ioc_regs = ioremap_nocache (dev -> hpa .start , 4096 );
1557
+ if (!ioc -> ioc_regs ) {
1558
+ kfree (ioc );
1559
+ return - ENOMEM ;
1560
+ }
1557
1561
ccio_ioc_init (ioc );
1558
1562
ccio_init_resources (ioc );
1559
1563
hppa_dma_ops = & ccio_ops ;
You can’t perform that action at this time.
0 commit comments