* linux-next: manual merge of the net tree with the wireless tree
@ 2010-10-06 1:09 Stephen Rothwell
2010-10-06 13:27 ` John W. Linville
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2010-10-06 1:09 UTC (permalink / raw)
To: David Miller, netdev
Cc: linux-next, linux-kernel, Dan Carpenter, Joe Perches,
John W. Linville
Hi all,
Today's linux-next merge of the net tree got a conflict in
drivers/net/wireless/ipw2x00/ipw2200.c between commit
2ee4e27cf25ab647137713ca16377d8d9e138ea2 ("ipw2200: check for allocation
failures") from the wireless tree and commit
baeb2ffab4e67bb9174e6166e070a9a8ec94b0f6 ("drivers/net: Convert unbounded
kzalloc calls to kcalloc") from the net tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/wireless/ipw2x00/ipw2200.c
index d04d760,0f25083..0000000
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@@ -11467,13 -11467,9 +11467,13 @@@ static int ipw_net_init(struct net_devi
bg_band->band = IEEE80211_BAND_2GHZ;
bg_band->n_channels = geo->bg_channels;
- bg_band->channels =
- kzalloc(geo->bg_channels *
- sizeof(struct ieee80211_channel), GFP_KERNEL);
+ bg_band->channels = kcalloc(geo->bg_channels,
+ sizeof(struct ieee80211_channel),
+ GFP_KERNEL);
+ if (!bg_band->channels) {
+ rc = -ENOMEM;
+ goto out;
+ }
/* translate geo->bg to bg_band.channels */
for (i = 0; i < geo->bg_channels; i++) {
bg_band->channels[i].band = IEEE80211_BAND_2GHZ;
@@@ -11506,13 -11502,9 +11506,13 @@@
a_band->band = IEEE80211_BAND_5GHZ;
a_band->n_channels = geo->a_channels;
- a_band->channels =
- kzalloc(geo->a_channels *
- sizeof(struct ieee80211_channel), GFP_KERNEL);
+ a_band->channels = kcalloc(geo->a_channels,
+ sizeof(struct ieee80211_channel),
+ GFP_KERNEL);
+ if (!a_band->channels) {
+ rc = -ENOMEM;
+ goto out;
+ }
/* translate geo->bg to a_band.channels */
for (i = 0; i < geo->a_channels; i++) {
a_band->channels[i].band = IEEE80211_BAND_2GHZ;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linux-next: manual merge of the net tree with the wireless tree
2010-10-06 1:09 linux-next: manual merge of the net tree with the wireless tree Stephen Rothwell
@ 2010-10-06 13:27 ` John W. Linville
0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2010-10-06 13:27 UTC (permalink / raw)
To: Stephen Rothwell
Cc: David Miller, netdev, linux-next, linux-kernel, Dan Carpenter,
Joe Perches
On Wed, Oct 06, 2010 at 12:09:08PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the net tree got a conflict in
> drivers/net/wireless/ipw2x00/ipw2200.c between commit
> 2ee4e27cf25ab647137713ca16377d8d9e138ea2 ("ipw2200: check for allocation
> failures") from the wireless tree and commit
> baeb2ffab4e67bb9174e6166e070a9a8ec94b0f6 ("drivers/net: Convert unbounded
> kzalloc calls to kcalloc") from the net tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.
That looks correct to me -- thanks!
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-06 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 1:09 linux-next: manual merge of the net tree with the wireless tree Stephen Rothwell
2010-10-06 13:27 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).