projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: smsc911x: Remove multiple exit points from smsc911x_open
[cascardo/linux.git]
/
drivers
/
net
/
ethernet
/
smsc
/
smc91x.c
diff --git
a/drivers/net/ethernet/smsc/smc91x.c
b/drivers/net/ethernet/smsc/smc91x.c
index
726b80f
..
503a3b6
100644
(file)
--- a/
drivers/net/ethernet/smsc/smc91x.c
+++ b/
drivers/net/ethernet/smsc/smc91x.c
@@
-2275,6
+2275,13
@@
static int smc_drv_probe(struct platform_device *pdev)
if (pd) {
memcpy(&lp->cfg, pd, sizeof(lp->cfg));
lp->io_shift = SMC91X_IO_SHIFT(lp->cfg.flags);
if (pd) {
memcpy(&lp->cfg, pd, sizeof(lp->cfg));
lp->io_shift = SMC91X_IO_SHIFT(lp->cfg.flags);
+
+ if (!SMC_8BIT(lp) && !SMC_16BIT(lp)) {
+ dev_err(&pdev->dev,
+ "at least one of 8-bit or 16-bit access support is required.\n");
+ ret = -ENXIO;
+ goto out_free_netdev;
+ }
}
#if IS_BUILTIN(CONFIG_OF)
}
#if IS_BUILTIN(CONFIG_OF)