@@ -1557,10 +1557,9 @@ static void hpsa_monitor_offline_device(struct ctlr_info *h,
1557
1557
1558
1558
/* Device is not on the list, add it. */
1559
1559
device = kmalloc (sizeof (* device ), GFP_KERNEL );
1560
- if (!device ) {
1561
- dev_warn (& h -> pdev -> dev , "out of memory in %s\n" , __func__ );
1560
+ if (!device )
1562
1561
return ;
1563
- }
1562
+
1564
1563
memcpy (device -> scsi3addr , scsi3addr , sizeof (device -> scsi3addr ));
1565
1564
spin_lock_irqsave (& h -> offline_device_lock , flags );
1566
1565
list_add_tail (& device -> offline_list , & h -> offline_device_list );
@@ -2142,17 +2141,15 @@ static int hpsa_alloc_sg_chain_blocks(struct ctlr_info *h)
2142
2141
2143
2142
h -> cmd_sg_list = kzalloc (sizeof (* h -> cmd_sg_list ) * h -> nr_cmds ,
2144
2143
GFP_KERNEL );
2145
- if (!h -> cmd_sg_list ) {
2146
- dev_err (& h -> pdev -> dev , "Failed to allocate SG list\n" );
2144
+ if (!h -> cmd_sg_list )
2147
2145
return - ENOMEM ;
2148
- }
2146
+
2149
2147
for (i = 0 ; i < h -> nr_cmds ; i ++ ) {
2150
2148
h -> cmd_sg_list [i ] = kmalloc (sizeof (* h -> cmd_sg_list [i ]) *
2151
2149
h -> chainsize , GFP_KERNEL );
2152
- if (!h -> cmd_sg_list [i ]) {
2153
- dev_err (& h -> pdev -> dev , "Failed to allocate cmd SG\n" );
2150
+ if (!h -> cmd_sg_list [i ])
2154
2151
goto clean ;
2155
- }
2152
+
2156
2153
}
2157
2154
return 0 ;
2158
2155
@@ -3454,11 +3451,8 @@ static void hpsa_get_sas_address(struct ctlr_info *h, unsigned char *scsi3addr,
3454
3451
struct bmic_sense_subsystem_info * ssi ;
3455
3452
3456
3453
ssi = kzalloc (sizeof (* ssi ), GFP_KERNEL );
3457
- if (ssi == NULL ) {
3458
- dev_warn (& h -> pdev -> dev ,
3459
- "%s: out of memory\n" , __func__ );
3454
+ if (!ssi )
3460
3455
return ;
3461
- }
3462
3456
3463
3457
rc = hpsa_bmic_sense_subsystem_information (h ,
3464
3458
scsi3addr , 0 , ssi , sizeof (* ssi ));
@@ -4335,8 +4329,6 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
4335
4329
4336
4330
currentsd [i ] = kzalloc (sizeof (* currentsd [i ]), GFP_KERNEL );
4337
4331
if (!currentsd [i ]) {
4338
- dev_warn (& h -> pdev -> dev , "out of memory at %s:%d\n" ,
4339
- __FILE__ , __LINE__ );
4340
4332
h -> drv_req_rescan = 1 ;
4341
4333
goto out ;
4342
4334
}
@@ -8597,14 +8589,12 @@ static int hpsa_luns_changed(struct ctlr_info *h)
8597
8589
*/
8598
8590
8599
8591
if (!h -> lastlogicals )
8600
- goto out ;
8592
+ return rc ;
8601
8593
8602
8594
logdev = kzalloc (sizeof (* logdev ), GFP_KERNEL );
8603
- if (!logdev ) {
8604
- dev_warn (& h -> pdev -> dev ,
8605
- "Out of memory, can't track lun changes.\n" );
8606
- goto out ;
8607
- }
8595
+ if (!logdev )
8596
+ return rc ;
8597
+
8608
8598
if (hpsa_scsi_do_report_luns (h , 1 , logdev , sizeof (* logdev ), 0 )) {
8609
8599
dev_warn (& h -> pdev -> dev ,
8610
8600
"report luns failed, can't track lun changes.\n" );
@@ -8998,11 +8988,8 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
8998
8988
return ;
8999
8989
9000
8990
options = kzalloc (sizeof (* options ), GFP_KERNEL );
9001
- if (!options ) {
9002
- dev_err (& h -> pdev -> dev ,
9003
- "Error: failed to disable rld caching, during alloc.\n" );
8991
+ if (!options )
9004
8992
return ;
9005
- }
9006
8993
9007
8994
c = cmd_alloc (h );
9008
8995
0 commit comments