sis7018: Fix PVS 1617
Use new(std::nothrow) so that NULL check for allocated memory makes sense. Change-Id: Iab5efa869b83f5a312a1eaf8851a9e99888ff075 Reviewed-on: https://review.haiku-os.org/691 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
6c8b0b3724
commit
82bbd737a1
@@ -79,7 +79,7 @@ init_driver()
|
||||
break;
|
||||
}
|
||||
|
||||
Device* device = new Device(cardInfos[idx], info);
|
||||
Device* device = new(std::nothrow) Device(cardInfos[idx], info);
|
||||
if (device == 0) {
|
||||
return ENODEV;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user