mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 10:49:28 +00:00
skfp: testing the wrong variable in skfp_driver_init()
The intent here was to test if the allocation failed but we tested "SharedMemSize" instead of "SharedMemAddr" by mistake. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d39cd5e99a
commit
4a5fc4e179
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev)
|
||||||
bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
|
bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev,
|
||||||
bp->SharedMemSize,
|
bp->SharedMemSize,
|
||||||
&bp->SharedMemDMA);
|
&bp->SharedMemDMA);
|
||||||
if (!bp->SharedMemSize) {
|
if (!bp->SharedMemAddr) {
|
||||||
printk("could not allocate mem for ");
|
printk("could not allocate mem for ");
|
||||||
printk("hardware module: %ld byte\n",
|
printk("hardware module: %ld byte\n",
|
||||||
bp->SharedMemSize);
|
bp->SharedMemSize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue