drivers/parport/parport_cs.c | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-)
- Replaced pr_notice with dev_err for proper kernel error logging.
- Added explicit cleanup of link->priv on failure in probe and config.
- Improved comments and readability in parport_probe() and parport_config().
- Ensured allocation checks are consistent (kzalloc returns checked).
- Minor refactoring for clarity and maintainability.
Signed-off-by: Biancaa Ramesh <biancaa2210329@ssn.edu.in>
---
drivers/parport/parport_cs.c | 38 +++++++++++++++++++++++++++---------
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index 8e7e3ac4bb87..c6d3f2ee03f7 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -83,19 +83,35 @@ static void parport_cs_release(struct pcmcia_device *);
static int parport_probe(struct pcmcia_device *link)
{
parport_info_t *info;
+ int ret;
- dev_dbg(&link->dev, "parport_attach()\n");
+ dev_dbg(&link->dev, "parport_probe()\n");
- /* Create new parport device */
+ /* Allocate private driver info */
info = kzalloc(sizeof(*info), GFP_KERNEL);
- if (!info) return -ENOMEM;
+ if (!info) {
+ dev_err(&link->dev, "failed to allocate parport_info\n");
+ return -ENOMEM;
+ }
+
link->priv = info;
info->p_dev = link;
+ /* Enable IRQ and auto IO for configuration */
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
- return parport_config(link);
-} /* parport_attach */
+ /* Delegate actual configuration to parport_config() */
+ ret = parport_config(link);
+ if (ret) {
+ dev_err(&link->dev, "parport configuration failed\n");
+ kfree(info);
+ link->priv = NULL;
+ return ret;
+ }
+
+ return 0;
+}
+
static void parport_detach(struct pcmcia_device *link)
{
@@ -141,10 +157,13 @@ static int parport_config(struct pcmcia_device *link)
link->resource[1]->start,
link->irq, PARPORT_DMA_NONE,
&link->dev, IRQF_SHARED);
- if (p == NULL) {
- pr_notice("parport_cs: parport_pc_probe_port() at 0x%3x, irq %u failed\n",
- (unsigned int)link->resource[0]->start, link->irq);
- goto failed;
+ if (!p) {
+ dev_err(&link->dev,
+ "parport_pc_probe_port() failed at 0x%03x, irq %u\n",
+ (unsigned int)link->resource[0]->start, link->irq);
+ goto failed;
+ }
+
}
p->modes |= PARPORT_MODE_PCSPP;
@@ -158,6 +177,7 @@ static int parport_config(struct pcmcia_device *link)
failed:
parport_cs_release(link);
kfree(link->priv);
+ link->priv = NULL;
return -ENODEV;
} /* parport_config */
--
2.43.0
--
::DISCLAIMER::
---------------------------------------------------------------------
The
contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. Views or opinions, if any,
presented in
this email are solely those of the author and may not
necessarily reflect
the views or opinions of SSN Institutions (SSN) or its
affiliates. Any form
of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of this message without the
prior written
consent of authorized representative of SSN is strictly
prohibited. If you
have received this email in error please delete it and
notify the sender
immediately.
---------------------------------------------------------------------
Header of this mail should have a valid DKIM signature for the domain
ssn.edu.in <http://www.ssn.edu.in/>
Hi Biancaa,
kernel test robot noticed the following build errors:
[auto build test ERROR on sailus-media-tree/master]
[also build test ERROR on linus/master sailus-media-tree/streams v6.18-rc2 next-20251022]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Biancaa-Ramesh/pcmcia-parport_cs-Refactor-probe-function-and-improve-error-logging/20251022-030324
base: git://linuxtv.org/sailus/media_tree.git master
patch link: https://lore.kernel.org/r/20251021190021.173748-1-biancaa2210329%40ssn.edu.in
patch subject: [PATCH] pcmcia/parport_cs: Refactor probe function and improve error logging
config: x86_64-buildonly-randconfig-001-20251022 (https://download.01.org/0day-ci/archive/20251023/202510230450.v2a33A8Z-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251023/202510230450.v2a33A8Z-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510230450.v2a33A8Z-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/parport/parport_cs.c:137:21: warning: unused variable 'info' [-Wunused-variable]
137 | parport_info_t *info = link->priv;
| ^~~~
>> drivers/parport/parport_cs.c:148:11: error: use of undeclared label 'failed'
148 | goto failed;
| ^
>> drivers/parport/parport_cs.c:169:5: error: unknown type name 'p'
169 | p->modes |= PARPORT_MODE_PCSPP;
| ^
>> drivers/parport/parport_cs.c:169:6: error: expected identifier or '('
169 | p->modes |= PARPORT_MODE_PCSPP;
| ^
drivers/parport/parport_cs.c:170:5: error: expected identifier or '('
170 | if (epp_mode)
| ^
>> drivers/parport/parport_cs.c:172:5: error: unknown type name 'info'
172 | info->ndev = 1;
| ^
drivers/parport/parport_cs.c:172:9: error: expected identifier or '('
172 | info->ndev = 1;
| ^
drivers/parport/parport_cs.c:173:5: error: unknown type name 'info'
173 | info->port = p;
| ^
drivers/parport/parport_cs.c:173:9: error: expected identifier or '('
173 | info->port = p;
| ^
drivers/parport/parport_cs.c:175:5: error: expected identifier or '('
175 | return 0;
| ^
>> drivers/parport/parport_cs.c:177:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
177 | failed:
| ^
| int
>> drivers/parport/parport_cs.c:177:7: error: expected ';' after top level declarator
177 | failed:
| ^
| ;
drivers/parport/parport_cs.c:178:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
178 | parport_cs_release(link);
| ^
| int
>> drivers/parport/parport_cs.c:178:21: error: a parameter list without types is only allowed in a function definition
178 | parport_cs_release(link);
| ^
>> drivers/parport/parport_cs.c:179:8: error: unknown type name 'link'
179 | kfree(link->priv);
| ^
>> drivers/parport/parport_cs.c:179:12: error: expected ')'
179 | kfree(link->priv);
| ^
drivers/parport/parport_cs.c:179:7: note: to match this '('
179 | kfree(link->priv);
| ^
drivers/parport/parport_cs.c:179:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
179 | kfree(link->priv);
| ^
| int
drivers/parport/parport_cs.c:180:5: error: unknown type name 'link'
180 | link->priv = NULL;
| ^
drivers/parport/parport_cs.c:180:9: error: expected identifier or '('
180 | link->priv = NULL;
| ^
drivers/parport/parport_cs.c:181:2: error: expected identifier or '('
181 | return -ENODEV;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
vim +/failed +148 drivers/parport/parport_cs.c
84e2d34004dcd0 Dominik Brodowski 2008-07-29 134
15b99ac1729503 Dominik Brodowski 2006-03-31 135 static int parport_config(struct pcmcia_device *link)
^1da177e4c3f41 Linus Torvalds 2005-04-16 136 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 137 parport_info_t *info = link->priv;
^1da177e4c3f41 Linus Torvalds 2005-04-16 138 struct parport *p;
9b44de2015ff4a Dominik Brodowski 2009-10-24 139 int ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 140
9b44de2015ff4a Dominik Brodowski 2009-10-24 141 dev_dbg(&link->dev, "parport_config\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 142
00990e7ce0b0e5 Dominik Brodowski 2010-07-30 143 if (epp_mode)
00990e7ce0b0e5 Dominik Brodowski 2010-07-30 144 link->config_index |= FORCE_EPP_MODE;
00990e7ce0b0e5 Dominik Brodowski 2010-07-30 145
9b44de2015ff4a Dominik Brodowski 2009-10-24 146 ret = pcmcia_loop_config(link, parport_config_check, NULL);
9b44de2015ff4a Dominik Brodowski 2009-10-24 147 if (ret)
84e2d34004dcd0 Dominik Brodowski 2008-07-29 @148 goto failed;
^1da177e4c3f41 Linus Torvalds 2005-04-16 149
eb14120f743d29 Dominik Brodowski 2010-03-07 150 if (!link->irq)
9b44de2015ff4a Dominik Brodowski 2009-10-24 151 goto failed;
1ac71e5a35eebe Dominik Brodowski 2010-07-29 152 ret = pcmcia_enable_device(link);
9b44de2015ff4a Dominik Brodowski 2009-10-24 153 if (ret)
9b44de2015ff4a Dominik Brodowski 2009-10-24 154 goto failed;
^1da177e4c3f41 Linus Torvalds 2005-04-16 155
9a017a910346af Dominik Brodowski 2010-07-24 156 p = parport_pc_probe_port(link->resource[0]->start,
9a017a910346af Dominik Brodowski 2010-07-24 157 link->resource[1]->start,
eb14120f743d29 Dominik Brodowski 2010-03-07 158 link->irq, PARPORT_DMA_NONE,
51dcdfec6a274a Alan Cox 2009-04-07 159 &link->dev, IRQF_SHARED);
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 160 if (!p) {
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 161 dev_err(&link->dev,
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 162 "parport_pc_probe_port() failed at 0x%03x, irq %u\n",
decf26f6ec25da Joe Perches 2020-04-03 163 (unsigned int)link->resource[0]->start, link->irq);
^1da177e4c3f41 Linus Torvalds 2005-04-16 164 goto failed;
^1da177e4c3f41 Linus Torvalds 2005-04-16 165 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 166
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 167 }
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 168
^1da177e4c3f41 Linus Torvalds 2005-04-16 @169 p->modes |= PARPORT_MODE_PCSPP;
^1da177e4c3f41 Linus Torvalds 2005-04-16 170 if (epp_mode)
^1da177e4c3f41 Linus Torvalds 2005-04-16 171 p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @172 info->ndev = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 173 info->port = p;
^1da177e4c3f41 Linus Torvalds 2005-04-16 174
15b99ac1729503 Dominik Brodowski 2006-03-31 175 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 176
^1da177e4c3f41 Linus Torvalds 2005-04-16 @177 failed:
^1da177e4c3f41 Linus Torvalds 2005-04-16 @178 parport_cs_release(link);
21c75ad65f8e52 YueHaibing 2019-03-21 @179 kfree(link->priv);
fac3d7d7b11c82 Biancaa Ramesh 2025-10-22 180 link->priv = NULL;
15b99ac1729503 Dominik Brodowski 2006-03-31 181 return -ENODEV;
^1da177e4c3f41 Linus Torvalds 2005-04-16 182 } /* parport_config */
^1da177e4c3f41 Linus Torvalds 2005-04-16 183
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
> - Replaced pr_notice with dev_err for proper kernel error logging. > - Added explicit cleanup of link->priv on failure in probe and config. > - Improved comments and readability in parport_probe() and parport_config(). > - Ensured allocation checks are consistent (kzalloc returns checked). > - Minor refactoring for clarity and maintainability. Thanks for your try to adjust two function implementations. https://elixir.bootlin.com/linux/v6.18-rc2/source/drivers/parport/parport_cs.c#L83-L162 I see possibilities to improve such a change description another bit. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc2#n81 Please recheck the indentation approach accordingly. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.18-rc2#n18 … > -- > ::DISCLAIMER:: … > The > contents of this e-mail and any attachment(s) are confidential and … Please avoid such unwanted information for communication by the means of public mailing lists. https://subspace.kernel.org/etiquette.html#do-not-include-confidentiality-disclaimers Regards, Markus
Hi Biancaa,
kernel test robot noticed the following build errors:
[auto build test ERROR on sailus-media-tree/master]
[also build test ERROR on linus/master v6.18-rc2 next-20251022]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Biancaa-Ramesh/pcmcia-parport_cs-Refactor-probe-function-and-improve-error-logging/20251022-030324
base: git://linuxtv.org/sailus/media_tree.git master
patch link: https://lore.kernel.org/r/20251021190021.173748-1-biancaa2210329%40ssn.edu.in
patch subject: [PATCH] pcmcia/parport_cs: Refactor probe function and improve error logging
config: x86_64-buildonly-randconfig-006-20251022 (https://download.01.org/0day-ci/archive/20251022/202510222115.WBPLEBsN-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251022/202510222115.WBPLEBsN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510222115.WBPLEBsN-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/parport/parport_cs.c: In function 'parport_config':
>> drivers/parport/parport_cs.c:164:9: error: label 'failed' used but not defined
164 | goto failed;
| ^~~~
>> drivers/parport/parport_cs.c:137:21: warning: unused variable 'info' [-Wunused-variable]
137 | parport_info_t *info = link->priv;
| ^~~~
>> drivers/parport/parport_cs.c:167:5: warning: no return statement in function returning non-void [-Wreturn-type]
167 | }
| ^
drivers/parport/parport_cs.c: At top level:
>> drivers/parport/parport_cs.c:169:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
169 | p->modes |= PARPORT_MODE_PCSPP;
| ^~
>> drivers/parport/parport_cs.c:170:5: error: expected identifier or '(' before 'if'
170 | if (epp_mode)
| ^~
drivers/parport/parport_cs.c:172:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
172 | info->ndev = 1;
| ^~
drivers/parport/parport_cs.c:173:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
173 | info->port = p;
| ^~
>> drivers/parport/parport_cs.c:175:5: error: expected identifier or '(' before 'return'
175 | return 0;
| ^~~~~~
>> drivers/parport/parport_cs.c:177:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
177 | failed:
| ^
>> drivers/parport/parport_cs.c:179:19: error: expected ')' before '->' token
179 | kfree(link->priv);
| ^~
| )
drivers/parport/parport_cs.c:180:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
180 | link->priv = NULL;
| ^~
drivers/parport/parport_cs.c:181:9: error: expected identifier or '(' before 'return'
181 | return -ENODEV;
| ^~~~~~
>> drivers/parport/parport_cs.c:182:1: error: expected identifier or '(' before '}' token
182 | } /* parport_config */
| ^
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
Selected by [y]:
- GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
WARNING: unmet direct dependencies detected for GPIO_SYSCON
Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
Selected by [y]:
- GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
WARNING: unmet direct dependencies detected for I2C_K1
Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n]
Selected by [y]:
- MFD_SPACEMIT_P1 [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]
vim +/failed +164 drivers/parport/parport_cs.c
84e2d34004dcd0c Dominik Brodowski 2008-07-29 134
15b99ac1729503d Dominik Brodowski 2006-03-31 135 static int parport_config(struct pcmcia_device *link)
^1da177e4c3f415 Linus Torvalds 2005-04-16 136 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 @137 parport_info_t *info = link->priv;
^1da177e4c3f415 Linus Torvalds 2005-04-16 138 struct parport *p;
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 139 int ret;
^1da177e4c3f415 Linus Torvalds 2005-04-16 140
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 141 dev_dbg(&link->dev, "parport_config\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 142
00990e7ce0b0e59 Dominik Brodowski 2010-07-30 143 if (epp_mode)
00990e7ce0b0e59 Dominik Brodowski 2010-07-30 144 link->config_index |= FORCE_EPP_MODE;
00990e7ce0b0e59 Dominik Brodowski 2010-07-30 145
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 146 ret = pcmcia_loop_config(link, parport_config_check, NULL);
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 147 if (ret)
84e2d34004dcd0c Dominik Brodowski 2008-07-29 148 goto failed;
^1da177e4c3f415 Linus Torvalds 2005-04-16 149
eb14120f743d297 Dominik Brodowski 2010-03-07 150 if (!link->irq)
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 151 goto failed;
1ac71e5a35eebee Dominik Brodowski 2010-07-29 152 ret = pcmcia_enable_device(link);
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 153 if (ret)
9b44de2015ff4a2 Dominik Brodowski 2009-10-24 154 goto failed;
^1da177e4c3f415 Linus Torvalds 2005-04-16 155
9a017a910346afd Dominik Brodowski 2010-07-24 156 p = parport_pc_probe_port(link->resource[0]->start,
9a017a910346afd Dominik Brodowski 2010-07-24 157 link->resource[1]->start,
eb14120f743d297 Dominik Brodowski 2010-03-07 158 link->irq, PARPORT_DMA_NONE,
51dcdfec6a274af Alan Cox 2009-04-07 159 &link->dev, IRQF_SHARED);
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 160 if (!p) {
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 161 dev_err(&link->dev,
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 162 "parport_pc_probe_port() failed at 0x%03x, irq %u\n",
decf26f6ec25dac Joe Perches 2020-04-03 163 (unsigned int)link->resource[0]->start, link->irq);
^1da177e4c3f415 Linus Torvalds 2005-04-16 @164 goto failed;
^1da177e4c3f415 Linus Torvalds 2005-04-16 165 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 166
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 @167 }
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 168
^1da177e4c3f415 Linus Torvalds 2005-04-16 @169 p->modes |= PARPORT_MODE_PCSPP;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @170 if (epp_mode)
^1da177e4c3f415 Linus Torvalds 2005-04-16 171 p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP;
^1da177e4c3f415 Linus Torvalds 2005-04-16 172 info->ndev = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 173 info->port = p;
^1da177e4c3f415 Linus Torvalds 2005-04-16 174
15b99ac1729503d Dominik Brodowski 2006-03-31 @175 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 176
^1da177e4c3f415 Linus Torvalds 2005-04-16 @177 failed:
^1da177e4c3f415 Linus Torvalds 2005-04-16 178 parport_cs_release(link);
21c75ad65f8e521 YueHaibing 2019-03-21 @179 kfree(link->priv);
fac3d7d7b11c825 Biancaa Ramesh 2025-10-22 180 link->priv = NULL;
15b99ac1729503d Dominik Brodowski 2006-03-31 181 return -ENODEV;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @182 } /* parport_config */
^1da177e4c3f415 Linus Torvalds 2005-04-16 183
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
This patch fixes compilation errors and warnings in the parport_config
function of the pcmcia/parport_cs driver.
- Correct misplaced braces and missing failed label
- Use the 'info' variable properly to avoid unused variable warnings
- Ensure consistent indentation and logical error handling flow
This is a follow-up fix patch addressing build errors reported by kernel test
robot on top of my previous patch:
https://lore.kernel.org/all/202510222115.WBPLEBsN-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Biancaa Ramesh <biancaa2210329@ssn.edu.in>
---
drivers/parport/parport_cs.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index c6d3f2ee03f7..d2bcfad08870 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -141,45 +141,45 @@ static int parport_config(struct pcmcia_device *link)
dev_dbg(&link->dev, "parport_config\n");
if (epp_mode)
- link->config_index |= FORCE_EPP_MODE;
+ link->config_index |= FORCE_EPP_MODE;
ret = pcmcia_loop_config(link, parport_config_check, NULL);
if (ret)
- goto failed;
+ goto failed;
if (!link->irq)
- goto failed;
+ goto failed;
+
ret = pcmcia_enable_device(link);
if (ret)
- goto failed;
+ goto failed;
p = parport_pc_probe_port(link->resource[0]->start,
- link->resource[1]->start,
- link->irq, PARPORT_DMA_NONE,
- &link->dev, IRQF_SHARED);
+ link->resource[1]->start,
+ link->irq, PARPORT_DMA_NONE,
+ &link->dev, IRQF_SHARED);
if (!p) {
dev_err(&link->dev,
- "parport_pc_probe_port() failed at 0x%03x, irq %u\n",
- (unsigned int)link->resource[0]->start, link->irq);
+ "parport_pc_probe_port() failed at 0x%03x, irq %u\n",
+ (unsigned int)link->resource[0]->start, link->irq);
goto failed;
- }
-
}
p->modes |= PARPORT_MODE_PCSPP;
if (epp_mode)
- p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP;
+ p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP;
info->ndev = 1;
info->port = p;
return 0;
failed:
- parport_cs_release(link);
- kfree(link->priv);
+ parport_cs_release(link);
+ kfree(link->priv);
link->priv = NULL;
- return -ENODEV;
-} /* parport_config */
+ return -ENODEV;
+}
+ /* parport_config */
static void parport_cs_release(struct pcmcia_device *link)
{
--
2.43.0
--
::DISCLAIMER::
---------------------------------------------------------------------
The
contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only. Views or opinions, if any,
presented in
this email are solely those of the author and may not
necessarily reflect
the views or opinions of SSN Institutions (SSN) or its
affiliates. Any form
of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of this message without the
prior written
consent of authorized representative of SSN is strictly
prohibited. If you
have received this email in error please delete it and
notify the sender
immediately.
---------------------------------------------------------------------
Header of this mail should have a valid DKIM signature for the domain
ssn.edu.in <http://www.ssn.edu.in/>
> This patch fixes … Please fix remaining known open issues also according to Linux development processes. Are you looking for further guidance by more “advanced” communication tools? Regards, Markus
© 2016 - 2026 Red Hat, Inc.